From: Joel VanderWerf Date: 2003-05-12T02:55:49+09:00 Subject: Re: [RCR?] Enumerable#each with arguments ts wrote: >>>>>>"J" == Joel VanderWerf writes: > > > J> I don't understand. Neither of your #each methods takes arguments. > > You have found the fix :-) > > J> In the case of instances of REXML::Elements#each, an optional XPath string. > > and if someone want to call it with 2, 3, ... arguments ? Just pass them all on, from #collect to #each. We assume that the arguments tell #each something about how to filter or otherwise process the elements before yielding them. > For me, your problem seems specific to a class (REXML::Elements) Yes. I guess it would be more rubylike to always use select for this sort of thing. But in the case that someone writes a library where #each takes arguments, this proposal would propagate that functionality to the other Enumerable methods.