ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: hunter_spawn@hotmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:90764] [Ruby trunk Bug#15476] Branch coverage: Failing to load trivial sample when branch coverage is on
Date: Fri, 28 Dec 2018 04:49:03 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-15476.20181228044901.24ffc33fb875322e@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15476.20181228044901@ruby-lang.org

Issue #15476 has been reported by MaxLap (Maxime Lapointe).

----------------------------------------
Bug #15476: Branch coverage: Failing to load trivial sample when branch coverage is on
https://bugs.ruby-lang.org/issues/15476

* Author: MaxLap (Maxime Lapointe)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.0
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
The following will fail (for the second #load) on 2.6.0
I assume this is Ruby removing useless code, and the branch coverage code handling it incorrectly.

~~~ ruby
require 'tempfile'
f = Tempfile.new(['ruby', '.rb'])
f.write(<<-RUBY)
  nil&.map { |i| i }
RUBY
f.close

require 'coverage'

load f.path
puts 'Without coverage worked'
Coverage.start(branches: true)
load f.path
puts 'With coverage worked'
~~~

This problem was not present in 2.5, but appeared in 2.6




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

       reply	other threads:[~2018-12-28  4:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15476.20181228044901@ruby-lang.org>
2018-12-28  4:49 ` hunter_spawn [this message]
2018-12-28  4:52 ` [ruby-core:90765] [Ruby trunk Bug#15476] Branch coverage: Failing to load trivial sample when branch coverage is on hunter_spawn
2019-01-01  1:53 ` [ruby-core:90841] [Ruby trunk Bug#15476][Open] " mame
2019-01-14  6:34 ` [ruby-core:91070] [Ruby trunk Bug#15476] Branch coverage: Failing to load trivialsample " naruse

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.issue-15476.20181228044901.24ffc33fb875322e@ruby-lang.org \
    --to=ruby-core@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).