> -----Original Message-----
> From: Farrel Lifson [mailto:farrel.lifson / gmail.com] 
> Sent: Monday, March 27, 2006 12:59 PM
> To: ruby-talk ML
> Subject: "Unflattening" arrays
> 
> 
> Hi folks,
> 
> Is there an easy way to get [1,2,3,4,5,6,7,8] into 
> [[1,2],[3,4],[5,6],[7,9]] or [[1,2,3,4],[5,6,7,8]] depending 
> on a parameter?
> 
> Farrel

See Enumerable#partition

Regards,

Dan