Created
October 31, 2013 03:19
-
-
Save tcnksm/7243933 to your computer and use it in GitHub Desktop.
The sum of hash values by proc
This file contains 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 characters
hash = {a: 23, b: 24, c: 25} | |
puts hash.values.inject(&:+) == (23+24+25) # >> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment