mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
a7a81aa761
When called in combination with a method like `*_eval` or `*_exec` that switches self, `__send__` was passed an object that was not necessarily a symbol as the method name. This problem was discovered during the #6389 correction process.
9 lines
142 B
Ruby
9 lines
142 B
Ruby
class Symbol
|
|
def to_proc
|
|
mid = self
|
|
->(obj,*args,**opts,&block) do
|
|
obj.__send__(mid, *args, **opts, &block)
|
|
end
|
|
end
|
|
end
|