From: Charles Oliver Nutter Date: 2009-09-26T09:37:56+09:00 Subject: [ruby-core:25777] Re: A challenge: Enumerator#next in JRuby I didn't finish this sentence: On Fri, Sep 25, 2009 at 7:34 PM, Charles Oliver Nutter wrote: > JRuby and IronRuby. But if Enumerator#next were predicated on a > collection implementing both each and to_enum. But if Enumerator#next required you to implement to_enum, people writing new collections could opt into cursor-based enumeration in a more cross-compatible way. Ideally a custom to_enum impl would return a lightweight enumerator with a simple position, but a library author could implement it in other ways that don't require fibers or threads. - Charlie