Chris Hulan
2/4/2008 4:50:00 PM
On Feb 4, 11:32 am, Phlip <phlip2...@gmail.com> wrote:
> Robert Klemme wrote:
> > irb(main):001:0> [1, 2, 3, 4].to_enum(:each_slice, 2).to_a
>
> Thanks! Now, for those of us mired in the doldrums of Ruby 1.8.x, how to write
> to_enum in Ruby? I found each_slice, and I know C and ruby.h, but my Ruby
> internals are rusty...
>
> --
> Phlip
Ruby-docs.org indicates Object.to_enum exists in latest 1.8.6, can you
upgrade?