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/.