summaryrefslogtreecommitdiff
path: root/lib/ostruct.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-26 18:46:10 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-26 18:46:10 +0000
commit5219adf4f155069bb8277d5a2c063c6b17bb359c (patch)
tree5d807463be5447602fe1d6faf6a7ad2177deaa5c /lib/ostruct.rb
parent781c3ca574f8c0a15beb387caaf7213857ad74cb (diff)
lib/ostruct: Remove unnecessary `__send__`
Patch by yuuji.yaginuma [Fix GH-1890] Since `remove_method` is public. Ref: https://bugs.ruby-lang.org/issues/14133 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r--lib/ostruct.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index f2380144f3..8cf1233a79 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -294,7 +294,7 @@ class OpenStruct
def delete_field(name)
sym = name.to_sym
begin
- singleton_class.__send__(:remove_method, sym, "#{sym}=")
+ singleton_class.remove_method(sym, "#{sym}=")
rescue NameError
end
@table.delete(sym) do