diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-22 18:59:03 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-22 18:59:03 +0000 |
commit | dfb1a7122250bba977fee5d27226a2226b0fc62a (patch) | |
tree | 0d3986da186c975d8f0cf8b058c5d4747748ddce /lib/ostruct.rb | |
parent | 9c8d348d4973784c16db6fd24e547b217a7bc592 (diff) |
* lib/ostruct.rb (delete_field): Bug fix so previous value is returned.
Patch by Nick Recobra [Bug #6063]
* test/ostruct/test_ostruct.rb: Test for above
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 46c178c489..21bda73c37 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -190,8 +190,8 @@ class OpenStruct # def delete_field(name) sym = name.to_sym - @table.delete sym singleton_class.__send__(:remove_method, sym, "#{name}=") + @table.delete sym end InspectKey = :__inspect_key__ # :nodoc: |