From: why the lucky stiff Date: 2005-07-28T23:48:49+09:00 Subject: Re: Combination of two arrays Ara.T.Howard wrote: >> >> harp:~ > cat a.rb >> foo = [ "a", "b", "c", 'n' ] >> bar = [ 1 , 2 , 3 , 'm' ] >> >> p foo.zip(bar) >> >> harp:~ > ruby a.rb >> [["a", 1], ["b", 2], ["c", 3], ["n", "m"]] > I don't want Ara to fail! >> (foo * bar.length).sort.zip(bar * bar.length) => [["a", 1], ["a", 2], ["a", 3], ["a", "m"], ["b", 1], ["b", 2], ["b", 3], ["b", "m"], ["c", 1], ["c", 2], ["c", 3], ["c", "m"], ["n", 1], ["n", 2], ["n", 3], ["n", "m"]] _why