Skip to content

Instantly share code, notes, and snippets.

@gamov
Created April 9, 2010 09:52
Show Gist options
  • Save gamov/361026 to your computer and use it in GitHub Desktop.
Save gamov/361026 to your computer and use it in GitHub Desktop.
requested_items.inject(0) { |sum,it| sum += it.value } #works
# requested_items.inject() { |sum,it| sum += it.value } #not working
# requested_items.sum {|it| it.price } # not working
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment