summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ostruct.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index 17efcdc8d3..bae0f3aac5 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -73,7 +73,10 @@
class OpenStruct
# :nodoc:
class << self
- alias allocate new
+ def allocate
+ (x = super).instance_variable_set(:@table, {})
+ x
+ end
end
#