Ryan Leavengood wrote:
> On 10/18/05, Kevin Ballard <kballard / gmail.com> wrote:
> >
> > At this point I'm considering wrapping this up in a gem for
> > distribution. Any thoughts?
>
> It looks interesting, but I think you are replicating the work done by
> Nobu Nakada with the Enumerator class. For example, read this:
>
> http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/11669710e085ca07
>
> But it seems this newer functionality won't be backported to 1.8, so
> your code may be useful in the meantime. I'm also not sure if the
> enumerator version works exactly the same as yours.

Hrm, interesting, but that doesn't really shed much light on what
Enumerator is going to do. Is it going to be like a built-in Generator,
or what? Is there another thread that talks about it?

> Also, while this is cool, I find it somewhat confusing since it
> changes Ruby iterator semantics quite a bit.

Yeah, but it only affects the case where you don't pass a block, and
that's not very useful in the default functionality (for #each it
raises an error, for #collect it appears to just be equivalent to
#to_a, dunno about the rest but they're all expecting blocks).

The talk about Enumerator does have me concerned, though, because if
anybody used my code, and the Enumerator thing goes into 2.0, when they
upgrade from Ruby 1.8 to 2.0 it's gonna break.