diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/set.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/set.rb b/lib/set.rb index 0d9870ccd7..db57594d0a 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -100,11 +100,18 @@ class Set end private :do_with_enum - # Copy internal hash. - def initialize_copy(orig) + # Dup internal hash. + def initialize_dup(orig) + super @hash = orig.instance_variable_get(:@hash).dup end + # Clone internal hash. + def initialize_clone(orig) + super + @hash = orig.instance_variable_get(:@hash).clone + end + def freeze # :nodoc: @hash.freeze super |