From: r@... Date: 2015-01-23T13:54:02+00:00 Subject: [ruby-core:67765] [ruby-trunk - Bug #10775] [Open] "break" from a block with nested begin-rescue became impossible Issue #10775 has been reported by MISUMI Rize. ---------------------------------------- Bug #10775: "break" from a block with nested begin-rescue became impossible https://bugs.ruby-lang.org/issues/10775 * Author: MISUMI Rize * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-01-23 trunk 49389) [x86_64-darwin14] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- "break" from a block with nested begin-rescue became impossible. Example(it is valid on Ruby 2.2.0, 2.1.5): ~~~ 2.times do begin raise rescue begin raise rescue break end end end ~~~ Output: ~~~ test.rb:8:in `rescue in rescue in block in
': break from proc-closure (LocalJumpError) from test.rb:5:in `rescue in block in
' from test.rb:2:in `block in
' from test.rb:1:in `each' from test.rb:1:in `
' ~~~ I wrote test and fix on GitHub. Please see the [pull request](https://github.com/ruby/ruby/pull/820). -- https://bugs.ruby-lang.org/