mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Symbol#to_proc to support block call.
based on a patch from @ksss; close #2071
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
class Symbol
|
||||
|
||||
def to_proc
|
||||
->(obj,*args) do
|
||||
obj.send(self, *args)
|
||||
->(obj,*args,&block) do
|
||||
obj.send(self, *args, &block)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user