Actions
Bug #3792
closedProcs created via Method#to_proc and Symbol#to_proc don't pass a block thru
Description
=begin
class C
def foo
yield
end
end
f = :foo.to_proc
f.(C.new) { puts 'bar' } rescue p $!
m = C.new.method(:foo)
q = m.to_proc
q.() { puts 'bar' } rescue p $!
Output:
#<LocalJumpError: no block given (yield)>
#<LocalJumpError: no block given (yield)>
Expected:
bar
bar
=end
Actions
Like0
Like0Like0Like0