Skip to content

Instantly share code, notes, and snippets.

@gilesbowkett
Created August 25, 2011 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gilesbowkett/1171508 to your computer and use it in GitHub Desktop.
Save gilesbowkett/1171508 to your computer and use it in GitHub Desktop.
why does this CoffeeScript not accurately translate this Ruby?
insert: (ball, column) ->
inserted = false
for row in @rows
if null == row[column]
row[column] = ball unless inserted
inserted = true
def insert(ball, column)
@grid.each do |row|
next unless row[column].nil?
row[column] = ball
return
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment