From: William Djaja Tjokroaminata Date: 2002-10-01T02:17:15+09:00 Subject: Re: Where Is Method Call Precedence? Hi, Thanks for the explanation; now it is more clear to me regarding the difference between "pass by value" and "pass by reference" with respect to hash keys. But still, the following code still does not give what I expect: # ruby 1.6.7 (2002-03-01) [i686-linux] s = "mutable" arr = [s] arr.freeze # make the array immutable ??? hash = { arr => "object" } s.upcase! p hash[arr] #=> nil (I really thought that in Ruby the hash keys had all been "pass by reference.") Regards, Bill ============================================================================ Marcin 'Qrczak' Kowalczyk wrote: > In Ruby any object can be frozen. In Python immutable and mutable > types are usually separate: mutability is not an attribute of an > object but a property of its type. (User-defined classes are not > formally classified, only intentionally.)