From: hunter_spawn@... Date: 2018-12-28T04:52:21+00:00 Subject: [ruby-core:90765] [Ruby trunk Bug#15476] Branch coverage: Failing to load trivial sample when branch coverage is on Issue #15476 has been updated by MaxLap (Maxime Lapointe). Sorry, forgot to include the error message: ~~~ /tmp/ruby20181227-3429-1ubxjqu.rb:1:in `': no implicit conversion of false into Integer (TypeError) ~~~ ---------------------------------------- Bug #15476: Branch coverage: Failing to load trivial sample when branch coverage is on https://bugs.ruby-lang.org/issues/15476#change-75938 * Author: MaxLap (Maxime Lapointe) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux] * 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/ Unsubscribe: