From: Brian Candler Date: 2011-12-26T18:36:26+09:00 Subject: Re: How to Combo Thomas Sawyer wrote in post #1038150: > Easiest implementation of "some_method" in Ruby? > > a = %w|a b| > b = %w|a x| > c = %w|x y| > > some_method(a,b,c) > > #=> > > [ ["a", "a", "x"] > ["a", "a", "y"] > ["a", "x", "x"] > ["a", "x", "y"] > ["b", "a", "x"] > ["b", "a", "y"] > ["b", "x", "x"] > ["b", "x", "y"] ] > > Order doesn't really matter. Does some_method only accept exactly three arguments? Is each argument an array of exactly two elements? -- Posted via http://www.ruby-forum.com/.