From: Gawnsoft Date: 2003-07-19T00:04:48+09:00 Subject: Re: Aliased setter methods behave differently than other methods? On Fri, 18 Jul 2003 23:19:37 +0900, Jim Cain wrote (more or less): >nobu.nokada@softhome.net wrote: >> Hi, >> >> At Fri, 18 Jul 2003 14:10:24 +0900, >> Jim Cain wrote: >> >>>Notice that, in the class where the method is "hello=" rather than >>>"hello", the call to the old method fails somehow. Its output is skipped. >> >> >> enalias for hello= will be excuted as bellow: >> >> alias_method(('old_hello=').intern, 'hello='.intern) >> module_eval <<-EOF >> def hello=(arg) >> puts 'hola ' + arg >> old_hello=(arg) # just local variable assignment. >> end >> EOF >> > >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 ? Cheers, Euan Gawnsoft: http://www.gawnsoft.co.sr Symbian/Epoc wiki: http://html.dnsalias.net:1122 Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk