Created
October 20, 2013 13:31
Revisions
-
twosevenzero created this gist
Oct 20, 2013 .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,13 @@ # # I hate having to define a new array, run the each loop and then explicitly return the array. # # How can I fix this. # def rows rows_as_array = Array.new @puzzle.each_line do |line| rows_as_array.push line.gsub(/[\s\|\-\+]/,"").split(//) unless line.start_with?("-") end rows_as_array end