From: Eric Luo Date: 2006-03-29T13:08:44+09:00 Subject: Re: Noob: The ruby way to multiple Array by multiple? Ryan> class Array Ryan> def x(b) Ryan> a = self Ryan> (a * b.size).zip(b * a.size) Ryan> end Ryan> end Ryan> a.x b Ryan> => [[1, 4], [2, 5], [3, 6], [1, 4], [2, 5], [3, 6], [1, 4], [2, 5], Ryan> [3, 6]] Thanks for your hint, It seems so simple and pretty.