On Sat, Jul 19, 2003 at 12:04:48AM +0900, Gawnsoft wrote: > >Of course! Duh. I stared and stared at that one and never saw it from > >Ruby's point of view. Now I just have to figure out how to make it look > >like a method call. > > > Errmm, not obvious to me (a newbie). What's the significance of the = > suffix in amethod name that makes it behave differently foo = x is always interpreted as an assignment to local variable 'foo'; and from that point onwards in that method, 'foo' by itself is treated as a local variable rather than a method. So, a local variable assignment takes precedence over any method with the same name which might exist. Hence you cannot call a method 'foo=' with the above syntax. You can however specify a receiver (self.foo=) or use 'send', in which case it is unambiguously a method call. Ought to be documented here, but doesn't appear to be :-) http://www.rubygarden.org/ruby?ThingsNewcomersShouldKnow Regards, Brian.