[#67346] Future of test suites for Ruby — Charles Oliver Nutter <headius@...>

I'll try to be brief so we can discuss all this. tl;dr: RubySpec is

19 messages 2015/01/05

[ruby-core:67765] [ruby-trunk - Bug #10775] [Open] "break" from a block with nested begin-rescue became impossible

From: r@...
Date: 2015-01-23 13:54:02 UTC
List: ruby-core #67765
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 <main>': break from proc-closure (LocalJumpError)
	from test.rb:5:in `rescue in block in <main>'
	from test.rb:2:in `block in <main>'
	from test.rb:1:in `each'
	from test.rb:1:in `<main>'
~~~

I wrote test and fix on GitHub. Please see the [pull request](https://github.com/ruby/ruby/pull/820).



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next