From: David Alan Black Date: 2002-04-03T22:23:47+09:00 Subject: Re: Understanding Python Hi -- On Wed, 3 Apr 2002, Massimiliano Mirra wrote: > On Wed, Apr 03, 2002 at 05:33:49AM +0900, Dr. David Mertz wrote: > > >>> map(just_say, klasses) > > AFAIK (which is only a little Ruby), one would do this in Ruby by > > iterating over a code block... but the code block would still use a > > temporary name to refer to the object whose method is called. > > Not if you can spend five minutes writing each_send into Enumerable. > > klasses.each_send(:just_say) See http://www.rubygarden.com/article.php?sid=127 for a discussion of the pros and cons of this (culminating in a rejected RCR, but still doable in Ruby). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav