On 10/30/05, Trans <transfire / gmail.com> wrote:
>
> Pit Capitain wrote:
> >
> > require "enumerator"
> >
> > ObjectSpace.enum_for(:each_object, Class).select { |c| c.name =~ /^S/ }
>
> He he! Yep, I'd call that "inflation" alright ;). Better yet, now we've
> almost come full circle since #enum_for works in essentially the same
> way as #every !
>
> Don't you just love it David!? ;)
>
> Thanks but no thanks. I'll take an Enumerable with args and a
> elementwise operator over this any day.

Why? Do you have a good reason beyond the fact that you took all the
time to write your Enumerable with args? The enumerator code makes
perfect sense to me, and requires less code than your version. Plus
you are modifying a core class, which is generally looked upon as a
bad practice.

Ryan