From: Eric Wong Date: 2014-02-21T07:57:07+00:00 Subject: [ruby-core:60931] Re: [ruby-trunk - Feature #9508] Add method coverage and branch coverage metrics 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.