Created
January 12, 2011 21:10
-
-
Save rbxbx/776884 to your computer and use it in GitHub Desktop.
Hash#map_keys
This file contains hidden or 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
| class Hash | |
| def map_keys(&blk) | |
| Hash[keys.map(&blk).zip(values)] | |
| end | |
| end |
Author
:D
Unfortunately, ended up not needing it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hot