From: Albert Schlef Date: 2010-04-01T08:41:31+09:00 Subject: Re: each_slice() Rick Denatale wrote: >> so that it works in Ruby 1.8 too? > > require 'enumerator' > > ruby -v > ruby 1.8.7 (2009-12-24 patchlevel 248) > > irb > > irb(main):001:0> require 'enumerator' > => false > irb(main):002:0> (1..6).to_a.each_slice(2).to_a > => [[1, 2], [3, 4], [5, 6]] But how is your answer helpful? I know each_slice() works in some versions of 1.8. It works on my 1.8 too. My question was: starting with *which* version? -- Posted via http://www.ruby-forum.com/.