From: "usa (Usaku NAKAMURA) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "usa (Usaku NAKAMURA)" <noreply@ruby-lang.org>
Subject: [ruby-core:115262] [Ruby master Bug#18991] False LocalJumpError when branch coverage is enabled
Date: Mon, 06 Nov 2023 11:14:53 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-105178.20231106111452.31364@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-18991.20220902032206.31364@ruby-lang.org
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 <top (required)>': break from proc-closure (LocalJumpError)
from <internal:kernel>:90:in `tap'
from /Users/qnighy/workdir/branch-coverage-bug/test2.rb:1:in `<top (required)>'
from test.rb:5:in `load'
from test.rb:5:in `<main>'
```
--
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/
prev parent reply other threads:[~2023-11-06 11:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 3:22 [ruby-core:109822] [Ruby master Bug#18991] False LocalJumpError when branch coverage is enabled qnighy (Masaki Hara)
2022-09-02 10:19 ` [ruby-core:109824] " mame (Yusuke Endoh)
2022-11-08 2:59 ` [ruby-core:110649] " mame (Yusuke Endoh)
2023-10-26 0:22 ` [ruby-core:115173] " kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core
2023-11-06 11:14 ` usa (Usaku NAKAMURA) via ruby-core [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-105178.20231106111452.31364@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
--cc=noreply@ruby-lang.org \
--cc=ruby-core@ml.ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).