From: Giampiero Zanchi Date: 2009-12-19T01:12:18+09:00 Subject: Re: Unique combination of values from arrays one = ['one', 'two'] two = ['three', 'four'] three = ['five', 'six'] p one.product(two.product(three)).map {|x| x.flatten.join(" ")} produces ["one three five", "one three six", "one four five", "one four six", "two three five", "two three six", "two four five", "two four six"] -- Posted via http://www.ruby-forum.com/.