From: Mohammad Khan Date: 2005-01-20T02:14:59+09:00 Subject: Re: value by reference On Wed, 2005-01-19 at 12:01, Florian Gross wrote: > Mohammad Khan wrote: > > > do_something(a, b, c) # change a, b, c like other objects > > Let me give an example: > > x, y, z = 1, 2, 3 > do_something(x, y, z) # completely equivalent to > do_something(1, 2, 3) > > do_something() does not get variables. It gets the values the variables > refer to. (It gets the objects the variables are names for.) I understand that. But what about scenario 2? Scenario 2 is not acting as scenario 1, is it because scenario 2 gets object rather than variable? Or, Scenario 2 gets clonable object while scenario 1 not? Thanks, Florian. -- Mohammad > > Therefore it can not change the variables, they are nothing physical. > > variable.rb lets you turn variables *themselves* into Objects that can > be passed to methods.