From: Sebastian Hungerecker Date: 2007-09-18T00:31:00+09:00 Subject: Re: group array elements in groups of two Stefano Crocco wrote: > require 'enumerator' > arr = [1, 2, 3, 4, 5, 6, 7, 8] > new = arr.enum_for(:each_slice , 2).inject([]){|res, c| res << c} You can simply replace the inject with a call to to_a: new = arr.enum_for(:each_slice , 2).to_a -- NP: The Haunted - DOA Jabber: sepp2k@jabber.org ICQ: 205544826