Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Forked from gilesbowkett/wtf.coffee
Created August 25, 2011 19:12
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 jashkenas/1171530 to your computer and use it in GitHub Desktop.
Save jashkenas/1171530 to your computer and use it in GitHub Desktop.
why does this CoffeeScript not accurately translate this Ruby?
insert: (ball, column) ->
for row in @rows when row[column] is null
row[column] = ball
return
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