From: Chris Hulan Date: 2008-02-05T01:54:56+09:00 Subject: Re: convert array to array-of-arrays? On Feb 4, 11:32 am, Phlip 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?