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
Updated by sorah (Sorah Fukumori) over 14 years ago
Updated by shyouhei (Shyouhei Urabe) over 14 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
=begin
https://twitter.com/n0kada/status/23096074550
=end
Updated by nobu (Nobuyoshi Nakada) about 14 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29335.
Tomas, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Actions
Like0
Like0Like0Like0