Skip to content

Instantly share code, notes, and snippets.

@fdutey
Created February 27, 2009 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fdutey/71350 to your computer and use it in GitHub Desktop.
Save fdutey/71350 to your computer and use it in GitHub Desktop.
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