From: Robert Dober Date: 2010-11-12T23:56:43+09:00 Subject: Re: what's an object? On Fri, Nov 12, 2010 at 1:31 PM, Xavier Noria wrote: > On Fri, Nov 12, 2010 at 1:09 PM, Robert Dober wrote: > >    a -> 2158937800 -> "" >    b -> 2158937800 -> "" > > Note that a and b store the same reference value, but they are separate. > > If we assign a new string "b" to b inside the method with object id > 2158934000 the diagram becomes > >    a -> 2158937800 -> "" >    b -> 2158934000 -> "b" > > because a and b store different values. That's actually what I meant: When passing the parameter the diagram is correct. I do not see any reason why you claim the diagram incorrect - for what the param passing semantics concerns - only because Ruby gives you the freedom to reassign the param inside the body of the method. I wanted to express that this manipulation should not be used to prove the correctness or incorectness of a given param passing model. Clearer? Cheers R. -- The 1,000,000th fibonacci number contains '42' 2039 times; that is almost 30 occurrences more than expected (208988 digits). N.B. The 42nd fibonacci number does not contain '1000000' that is almost the expected 3.0e-06 times.