Created
February 27, 2009 08:07
-
-
Save fdutey/71350 to your computer and use it in GitHub Desktop.
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
a = { :a => '1', :b => '2' } | |
b = a.dup | |
with a do | |
def test_method | |
keys | |
end | |
end | |
a.test_method #=> [:b, :a] | |
b.test_method #=> raise NoMethodError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment