Does Ruby have a special stack for return value?

Posted by prosseek on Stack Overflow See other posts from Stack Overflow or by prosseek
Published on 2010-04-26T18:34:07Z Indexed on 2010/04/26 18:43 UTC
Read the original article Hit count: 144

Filed under:
|

The following Ruby code

def a(b,c) b+c end 

is the same as follows with Python

def a(b,c): return b+c

It looks like that ruby has the special stack that stores the final evaluation result and returns the value when a function is called.

  • If so, what's the name of the stack, and how can I get that stack?
  • If not, how does the Ruby code work without returning something?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about return-value