From: William James Date: 2005-10-14T02:46:54+09:00 Subject: Re: array1 + array2 newb question Mike Schramm wrote: > I'm trying to create a map grid from arrayed names of streets. I > want to go from [1,2,3] and [a,b,c] to [[1,a], [2,a], [3,a], > [1,b],... [3,c]]. > nums = [1,2,3] p %w(a b c).inject([]){|a,x| a + nums.zip(Array.new(nums.size){x}) }