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 CD8F317D5CD5 for ; Fri, 21 Feb 2014 17:05:21 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 43AFAB5D940 for ; Fri, 21 Feb 2014 16:57:23 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 2386097A83A for ; Fri, 21 Feb 2014 16:57:25 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V9-LB8PEQZwK for ; Fri, 21 Feb 2014 16:57:25 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 032D397A832 for ; Fri, 21 Feb 2014 16:57:25 +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 AEC0E952439 for ; Fri, 21 Feb 2014 16:57:22 +0900 (JST) Received: from [221.186.184.76] (unknown [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 8D6931205ED; Fri, 21 Feb 2014 16:57:14 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by neon.ruby-lang.org (Postfix) with ESMTP id 3E19C12058E for ; Fri, 21 Feb 2014 16:57:09 +0900 (JST) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id F23FE213A5; Fri, 21 Feb 2014 07:57:07 +0000 (UTC) Date: Fri, 21 Feb 2014 07:57:07 +0000 From: Eric Wong To: Ruby developers Message-ID: <20140221075707.GB2900@dcvr.yhbt.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-ML-Name: ruby-core X-Mail-Count: 60931 Subject: [ruby-core:60931] Re: [ruby-trunk - Feature #9508] Add method coverage and branch coverage metrics 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" sam.rawlins@gmail.com wrote: > Good call Eric. I've carried out your suggestion [1], and attached the cumulative patch. > > [1] this commit: https://github.com/srawlins/ruby/commit/cc50eab44f5ce0a4febdc05bdd99a09708e78b7e Thanks Sam! I didn't check very closely, but in places where before where you checked for "iseq->coverage" being true, now jumps straight to "iseq->coverage->(methods|branches|lines)". Wouldn't that crash if iseq->coverage isn't set at all? Unless I'm missing another check elsewhere, perhaps checking: (iseq->coverage && iseq->coverage->FOO) is safer.