On Fri, Feb 21, 2003 at 04:39:45AM +0900, Michael Bruschkewitz wrote:
> I had an association (Thinking C++) to operator= done on the var.
> So, "h[5]=3" would assign a reference to an instance of Integer with the 
> value 3, "e = h[5]" would assign this reference to e and finally,
> in "e=7" e.operator=(7) would assign 7 to this reference.  
> (Maybe this is not completely consistent.)
> Instead, "=" is just an assignment.

No, you are partly right, because xxx= and []= are methods when applied to
an object.

  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.

Regards,

Brian.