diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-23 15:44:26 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-23 15:44:26 +0000 |
commit | 54163e2b52559d8c996607c0df635743d47af81b (patch) | |
tree | dc32837d91955c2082855863df9b05f09c5ded32 /thread.c | |
parent | a14e13b23bea72ed78181f752eb6e9454b10eb9a (diff) | |
download | ruby-54163e2b52559d8c996607c0df635743d47af81b.tar.gz |
* thread.c (update_coverage): skip coverage count up if the current
line is out of the way. rb_sourceline() is unreliable when source
code is big. [ruby-dev:44413]
* test/coverage/test_coverage.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4764,7 +4764,7 @@ update_coverage(rb_event_flag_t event, VALUE proc, VALUE self, ID id, VALUE klas long line = rb_sourceline() - 1; long count; if (RARRAY_PTR(coverage)[line] == Qnil) { - rb_bug("bug"); + return; } count = FIX2LONG(RARRAY_PTR(coverage)[line]) + 1; if (POSFIXABLE(count)) { |