mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2162 from ksss/__send__
use Kernel#__send__ insteard of Kernel#send
This commit is contained in:
@@ -3,7 +3,7 @@ class Symbol
|
||||
|
||||
def to_proc
|
||||
->(obj,*args,&block) do
|
||||
obj.send(self, *args, &block)
|
||||
obj.__send__(self, *args, &block)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ module Enumerable
|
||||
raise ArgumentError, "too many arguments" if args.size > 2
|
||||
if Symbol === args[-1]
|
||||
sym = args[-1]
|
||||
block = ->(x,y){x.send(sym,y)}
|
||||
block = ->(x,y){x.__send__(sym,y)}
|
||||
args.pop
|
||||
end
|
||||
if args.empty?
|
||||
|
||||
Reference in New Issue
Block a user