From 5219adf4f155069bb8277d5a2c063c6b17bb359c Mon Sep 17 00:00:00 2001 From: marcandre Date: Thu, 26 Jul 2018 18:46:10 +0000 Subject: [PATCH] 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 --- lib/ostruct.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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