From: "mame (Yusuke Endoh)" Date: 2022-11-08T02:59:36+00:00 Subject: [ruby-core:110649] [Ruby master Bug#18991] False LocalJumpError when branch coverage is enabled Issue #18991 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to mame (Yusuke Endoh) After talking with @nobu and @ko1, we decided to put my patch. https://github.com/ruby/ruby/pull/6688 ---------------------------------------- Bug #18991: False LocalJumpError when branch coverage is enabled https://bugs.ruby-lang.org/issues/18991#change-99990 * Author: qnighy (Masaki Hara) * Status: Assigned * Priority: Normal * Assignee: mame (Yusuke Endoh) * ruby -v: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Enabling branch coverage leads to a false LocalJumpError where it should not be raised. ```ruby # test.rb require "coverage" Coverage.start(branches: true) # Coverage.start(lines: true) load "./test2.rb" ``` ```ruby # test2.rb 1&.tap do break end ``` Output: ``` $ ruby test.rb /Users/qnighy/workdir/branch-coverage-bug/test2.rb:1:in `block in ': break from proc-closure (LocalJumpError) from :90:in `tap' from /Users/qnighy/workdir/branch-coverage-bug/test2.rb:1:in `' from test.rb:5:in `load' from test.rb:5:in `
' ``` -- https://bugs.ruby-lang.org/ Unsubscribe: