mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
merge revision(s) 33030:
* 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/branches/ruby_1_9_3@34181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
60f63dc385
commit
d0ad683bb2
4 changed files with 35 additions and 6 deletions
2
thread.c
2
thread.c
|
@ -4804,7 +4804,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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue