From: "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" Date: 2023-10-26T00:22:09+00:00 Subject: [ruby-core:115173] [Ruby master Bug#18991] False LocalJumpError when branch coverage is enabled Issue #18991 has been updated by kjtsanaktsidis (KJ Tsanaktsidis). Thank you for the fix mame! Would it be possible for this to be backported to the 3.1 branch? The fix seems to apply cleanly and resolves our issue. I opened a backport PR here: https://github.com/ruby/ruby/pull/8768. ---------------------------------------- Bug #18991: False LocalJumpError when branch coverage is enabled https://bugs.ruby-lang.org/issues/18991#change-105084 * Author: qnighy (Masaki Hara) * Status: Closed * 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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/