diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-23 15:13:38 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-23 15:13:38 +0000 |
commit | 99d5d90f2f8d61d37b6eb110b54d84a08de5a4d1 (patch) | |
tree | b2815647f44ee1c99ed117a9a94b43e389912928 /lib | |
parent | b9e18abe4a881a638d0c6cfbbffeacea43813e86 (diff) |
* lib/ostruct.rb (OpenStruct#delete): Use the converted argument.
Patch by Kenichi Kamiya. [Fixes GH-383]
* test/ostruct/test_ostruct.rb: Added tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-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 6b60bdf3fe..3c14454437 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -220,7 +220,7 @@ class OpenStruct # def delete_field(name) sym = name.to_sym - singleton_class.__send__(:remove_method, sym, "#{name}=") + singleton_class.__send__(:remove_method, sym, "#{sym}=") @table.delete sym end |