Created
July 23, 2012 21:33
-
-
Save koriroys/3166359 to your computer and use it in GitHub Desktop.
Splatting ranges and zipping hashes
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'..'e'].zip [*1..5]] # => {"a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment