Skip to content

Instantly share code, notes, and snippets.

@kronos
Created March 18, 2010 23:37
Show Gist options
  • Save kronos/337059 to your computer and use it in GitHub Desktop.
Save kronos/337059 to your computer and use it in GitHub Desktop.
diff --git a/kernel/common/hash.rb b/kernel/common/hash.rb
index fe7c1ff..b095c26 100644
--- a/kernel/common/hash.rb
+++ b/kernel/common/hash.rb
@@ -253,6 +253,7 @@ class Hash
def dup
hash = self.class.new
+ hash.copy_object self
hash.send :initialize_copy, self
hash.taint if self.tainted?
hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment