From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 09DDC1B00068 for ; Thu, 6 Oct 2016 09:00:29 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 5CB8EB5D8A9 for ; Thu, 6 Oct 2016 09:32:10 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 9375418CC819 for ; Thu, 6 Oct 2016 09:32:10 +0900 (JST) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 79BD71204EB; Thu, 6 Oct 2016 09:32:09 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id CF6F912049B for ; Thu, 6 Oct 2016 09:32:05 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=q1dFY2u5iXfZpsRHHhiLMDpZPjY=; b=alGUPmJCktzjuIij4G wyYX3ZKH+ZNNBnWNn2gUFNVRPqSPzotSLgtu+gGreAQG6hK+OEgUh6TKoK7TrOXr C1NWqCHDSca0+yQ2o8fTVixthGFRYtBbFLMiPDxw6VtwClhoEWg8SlPGfcTXEvCs QdOUEmrjcgL6TEa9ZM3Q2eREE= Received: by filter0934p1mdw1.sendgrid.net with SMTP id filter0934p1mdw1.13286.57F59B813 2016-10-06 00:32:01.088376233 +0000 UTC Received: from herokuapp.com (ec2-54-234-53-173.compute-1.amazonaws.com [54.234.53.173]) by ismtpd0006p1iad1.sendgrid.net (SG) with ESMTP id BkjT4rx9R-eZY6VyYFq22A for ; Thu, 06 Oct 2016 00:32:00.887 +0000 (UTC) Date: Thu, 06 Oct 2016 00:32:00 +0000 From: hsbt@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 52341 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 12812 X-Redmine-Issue-Author: zenspider X-Redmine-Issue-Assignee: mame X-Redmine-Sender: hsbt 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS5cLFhqejdVpQppZ/hHTDq/+LHCAjcIEvT7NL cs/7XaEc4yeKeypBLh7Q/KPXxonpi0t2z62xe0j9eKkkuD1RrneUVZY9vsIMqciKDABPC7JQ6knhdc DD/Bfjp15RIcbePQX9na0AAWUd2AIOCvPNgzOD0AIpcz3S2tPlYSONlj9A== X-ML-Name: ruby-core X-Mail-Count: 77494 Subject: [ruby-core:77494] [Ruby trunk Bug#12812][Assigned] Added Coverage#result= 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 #12812 has been updated by Hiroshi SHIBATA. Status changed from Open to Assigned Assignee set to Yusuke Endoh ---------------------------------------- Bug #12812: Added Coverage#result= https://bugs.ruby-lang.org/issues/12812#change-60759 * Author: Ryan Davis * Status: Assigned * Priority: Normal * Assignee: Yusuke Endoh * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Originally submitted here: https://github.com/ruby/ruby/pull/1456 This exposes Coverage.result in a slightly more writeable way and allows coverage analysis to reset to a baseline in a safe way. Note, I wasn't able to figure out how to invalidate the cached pointers in the VM bytecode, so this does `rb_ary_replace` across all the arrays instead. I'd love to see this improved so it were cleaner. This is ongoing work to improve the current state of code coverage analysis. I'll be giving a talk on this at rubyconf 2016. I should also add, this applies cleanly to (at least) 2.3 as well. ---Files-------------------------------- coverage_result_set.diff (1.49 KB) -- https://bugs.ruby-lang.org/