From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00, FORGED_HOTMAIL_RCVD2,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 23CB0211BB for ; Fri, 28 Dec 2018 04:49:11 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 6100C12196C; Fri, 28 Dec 2018 13:49:08 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id C57A012190F for ; Fri, 28 Dec 2018 13:49:05 +0900 (JST) Received: by filter0136p3las1.sendgrid.net with SMTP id filter0136p3las1-24427-5C25AB3D-3F 2018-12-28 04:49:01.938743762 +0000 UTC m=+626138.181047418 Received: from herokuapp.com (ec2-54-224-124-17.compute-1.amazonaws.com [54.224.124.17]) by ismtpd0030p1mdw1.sendgrid.net (SG) with ESMTP id OFcPEpSqSZ2NCSFBcivLZw for ; Fri, 28 Dec 2018 04:49:01.727 +0000 (UTC) Date: Fri, 28 Dec 2018 04:49:03 +0000 (UTC) From: hunter_spawn@hotmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 66184 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15476 X-Redmine-Issue-Author: MaxLap X-Redmine-Sender: MaxLap X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4YqimxuVp6uihopQpvXBSbcXSvOtGRrw1SHF lXx0qxxZB+lxpJZS0UY4ZPmDvGn3fUhKbg1HA7cz9WFUepKTF6HjXpK1U7Aq8BjVA+xvWCktcY7cK/ c2zoH29S2kL84CL2WklDoygcmNM04xE68ObhIGCvaScAH29rQzHOWi7lpQ== X-ML-Name: ruby-core X-Mail-Count: 90764 Subject: [ruby-core:90764] [Ruby trunk Bug#15476] Branch coverage: Failing to load trivial sample when branch coverage is on X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" 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/