On Dec 19, 2013, at 3:37 AM, Mike Lerner <lists / ruby-forum.com> wrote:
> I have 2 arrays like so:
>=20
> arr1 =3D [a, b, c]
> arr2 =3D 1, 2, 3]
>=20
> I want to get:
>=20
> [a1, a2, a3, b1, b2, b3, c1, c2, c3]

Here=92s one way:

>> a1 =3D %w{a b c}
=3D> ["a", "b", "c"]
>> a2 =3D %w{1 2 3}
=3D> ["1", "2", "3"]
>> a1.map {|c1| a2.map {|c2| c1 + c2} }.flatten
=3D> ["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3=94]

HTH,
Ammar