From: "usa (Usaku NAKAMURA) via ruby-core" Date: 2023-11-06T11:14:53+00:00 Subject: [ruby-core:115262] [Ruby master Bug#18991] False LocalJumpError when branch coverage is enabled Issue #18991 has been updated by usa (Usaku NAKAMURA). Backport changed from 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: DONTNEED to 3.0: UNKNOWN, 3.1: DONE, 3.2: DONTNEED ruby_3_1 d494cf4ddababb80660381e963f910ccacc3f7bc merged revision(s) 4a7d6c2852aa734506be83c932168e8f974687b5. ---------------------------------------- Bug #18991: False LocalJumpError when branch coverage is enabled https://bugs.ruby-lang.org/issues/18991#change-105178 * 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: 3.0: UNKNOWN, 3.1: DONE, 3.2: DONTNEED ---------------------------------------- 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/