From: "Jesús Gabriel y Galán" Date: 2010-05-21T17:31:02+09:00 Subject: Re: Merging two arrays -> array of arrays On Fri, May 21, 2010 at 6:47 AM, Allen Walker wrote: > Example: > > a = [1,2,3] > b = [4,5,6] > > I want to merge them so the new array is: > > [ [1,4], [2,5], [3,6] ] > > Can't figure out the best way to do this. irb(main):001:0> [1,2,3].zip([4,5,6]) => [[1, 4], [2, 5], [3, 6]] Jesus.