From: John W Higgins Date: 2011-12-09T03:33:28+09:00 Subject: Re: Removing a multiple array layer --20cf307f361a73fd8404b398e7d4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Dec 8, 2011 at 10:04 AM, S=E9bastien M. wrote: > Tryed but does not the opposite expected output > [ > [["a", "b"], [["e", "f"], ["i", "j"]]], > [["a", "b"], [["e", "f"], ["k", "l"]]], > ... > ] > > what i try to get is > [ > [["a", "b"], ["e", "f"], ["i", "j"]], > [["a", "b"], ["e", "f"], ["k", "l"]], > ... > ] > > Are you claiming your input arrays are as follows? x =3D [['a', 'b']] y =3D [[['e', 'f'], ['i', 'j']], [['e', 'f'], ['k', 'l']]] That seems to be the only way to get what you are getting back with x.product(y) If that's the case then you would appear to want y.map{ |z| x + z } That would return your desired array. At least from the limited information you've provided. John --20cf307f361a73fd8404b398e7d4--