Hi,
In message "Re: [ruby-core:24097] [Bug #1707] Proc#call Raises ThreadError on 1.8 HEAD; LocalJumpError on Other Versions"
on Wed, 1 Jul 2009 01:07:46 +0900, Run Paint Run Run <redmine / ruby-lang.org> writes:
|The code below raises a LocalJumpError on 1.8.6, 1.8.7, and 1.9 HEAD. It raises a ThreadError ("return can't jump across threads") on 1.8 HEAD.
|
| def some_method(&b) b end
| a_proc = Proc.new { return }
| res = some_method(&a_proc)
| res.call
|
|Is this difference intentional? If so, why?
It's not intentional.
matz.