diff options
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r-- | lib/ostruct.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb index e7b8ed4609..e5b69608ad 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -168,7 +168,7 @@ class OpenStruct # def new_ostruct_member(name) name = name.to_sym - unless respond_to?(name) + unless singleton_class.method_defined?(name) define_singleton_method(name) { @table[name] } define_singleton_method("#{name}=") { |x| modifiable[name] = x } end |