Created
July 22, 2009 05:24
-
-
Save adamjmurray/151831 to your computer and use it in GitHub Desktop.
Revisions
-
adamjmurray created this gist
Jul 22, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ class Range def * other pairs = [] self.each do |i| other.each do |j| pairs << [i,j] end end return pairs end end ((0...6)*(0...4)).each do |x,y| puts "#{x},#{y}" end