зеркало из https://github.com/github/ruby.git
thread.c: check type of coverage
* thread.c (update_coverage): check type of coverage array not only if non-zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e266279aca
Коммит
c3900ff4a8
2
thread.c
2
thread.c
|
@ -4774,7 +4774,7 @@ static void
|
|||
update_coverage(rb_event_flag_t event, VALUE proc, VALUE self, ID id, VALUE klass)
|
||||
{
|
||||
VALUE coverage = rb_iseq_coverage(GET_THREAD()->cfp->iseq);
|
||||
if (coverage && RBASIC(coverage)->klass == 0) {
|
||||
if (RB_TYPE_P(coverage, T_ARRAY) && !RBASIC_CLASS(coverage)) {
|
||||
long line = rb_sourceline() - 1;
|
||||
long count;
|
||||
if (RARRAY_AREF(coverage, line) == Qnil) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче