From: Chris Hulan Date: 2008-02-05T00:54:56+09:00 Subject: Re: convert array to array-of-arrays? On Feb 4, 10:45 am, Phlip wrote: > Rubies: > > Given [1, 2, 3, 4], what's the most Rubiesque way to get [[1, 2], [3, 4]]? > > I had figured a variation on Array#transpose would be available, but I can't > find one! > > -- > Phlip have a look at enum.partition (http://ruby-doc.org/core/classes/ Enumerable.html#M003161) cheers