On Tue, Apr 19, 2011 at 12:55 PM, Johannes Held
<johannes.held / informatik.uni-erlangen.de> wrote:
> On 19.04.2011 09:44, Robert Klemme wrote:
>>
>> You can see an example in a recent posting:
>> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/381414
>
> But this can be achieved easier, as e.g. (0..9).cycle already returns an
> Enumerator.

Yes, but please note that #cycle was not used in the example posted by
me which I was referring to.  Any simple example can usually be solved
with another approach than Enumerator so I guess most examples which
are good for conveying functionality of Enumerator.new will suffer
from that very same issue. :-)

Kind regards

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/