Files
dearblue a7a81aa761 Storing method-id inside Symbol#to_proc
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.
2024-10-27 10:41:51 +09:00

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