aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ostruct.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r--lib/ostruct.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index 786bd4de20..b0bb775263 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -52,6 +52,12 @@ class OpenStruct
end
end
+ # Duplicate an OpenStruct object members.
+ def initialize_copy(orig)
+ super
+ @table = @table.dup
+ end
+
def method_missing(mid, *args) # :nodoc:
mname = mid.id2name
len = args.length