Skip to content

Instantly share code, notes, and snippets.

@Ebeta
Last active August 29, 2015 14:13
Show Gist options
  • Save Ebeta/619cf1de8f131e7afd76 to your computer and use it in GitHub Desktop.
Save Ebeta/619cf1de8f131e7afd76 to your computer and use it in GitHub Desktop.
class Array
def togeather
self.inject{|sum,x| sum + x }
end
end
[[1, 2], [3, 4]].togeather
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment