Created
May 21, 2012 21:03
-
-
Save maxjustus/2764682 to your computer and use it in GitHub Desktop.
Paranoid hashes
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
module CoreMixins | |
module ParanoidHash | |
def[](k) | |
fetch(k) | |
end | |
end | |
end | |
class Hash | |
def paranoid! | |
extend(CoreMixins::ParanoidHash) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment