From: Michael Bruschkewitz Date: 2003-02-23T21:46:56+09:00 Subject: Re: Return Values of [] for Array, Hash,... (ruby 1.6.8) In article <20030220223127.GA32672@uk.tiscali.com>, B.Candler@pobox.com says... > h[5]=3 is shorthand for h.send("[]=",5,3) > c.v=7 is shorthand for c.send("v=",7) > Both those are method calls (to objects referred to by local varables h and > c). But > e=7 > is an assignment to a local variable, because there is no explicit object > receiver given. Local variable 'e' then contains an objectref for the Fixnum > which represents the number 7. So, when there is a function: def fu h, key, o e = h[key] e.val = f1(o) e.val2 = f2(o) end .... these will (under most preconditions) change the content of the hash, and including "h[key]=e" at the end will be unnecessary - because the existence of "val=" and "val2=" grants there is an object receiver. Right? Michael B.