On Feb 4, 10:45 am, Phlip <phlip2... / gmail.com> 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