summaryrefslogtreecommitdiff
path: root/lib/forwardable.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2020-10-27 13:42:52 +0900
committerNobuyoshi Nakada <[email protected]>2020-10-27 16:12:45 +0900
commit3198e7abd70bd2af977f2bb6c967e9df8f91adb0 (patch)
tree12265cda813be994c0aaa3a63c66a06f15e91354 /lib/forwardable.rb
parentacdb8933384da8fce1e8d8a96946eacfaa8897e2 (diff)
Separate `send` into `public_send` and `__send__`
Diffstat (limited to 'lib/forwardable.rb')
-rw-r--r--lib/forwardable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/forwardable.rb b/lib/forwardable.rb
index d0f49f7309..c720feb4a4 100644
--- a/lib/forwardable.rb
+++ b/lib/forwardable.rb
@@ -189,7 +189,7 @@ module Forwardable
# If it's not a class or module, it's an instance
mod = Module === self ? self : singleton_class
ret = mod.module_eval(&gen)
- mod.send(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
+ mod.__send__(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
ret
end
@@ -309,7 +309,7 @@ module SingleForwardable
gen = Forwardable._delegator_method(self, accessor, method, ali)
ret = instance_eval(&gen)
- singleton_class.send(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
+ singleton_class.__send__(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
ret
end