summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-23 15:44:26 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-23 15:44:26 +0000
commit54163e2b52559d8c996607c0df635743d47af81b (patch)
treedc32837d91955c2082855863df9b05f09c5ded32 /thread.c
parenta14e13b23bea72ed78181f752eb6e9454b10eb9a (diff)
* 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 6970d8f62b..57a69629a6 100644
--- a/thread.c
+++ b/thread.c
@@ -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)) {