Skip to content

Instantly share code, notes, and snippets.

@koriroys
Created July 23, 2012 21:33
Show Gist options
  • Save koriroys/3166359 to your computer and use it in GitHub Desktop.
Save koriroys/3166359 to your computer and use it in GitHub Desktop.
Splatting ranges and zipping hashes
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