diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-10 16:19:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-10 16:19:40 +0000 |
commit | 2c300b14260052c0a56fa368d22576053440f33a (patch) | |
tree | cbab2696a97fc80c1ca8a544473c9f20e4f75bff /compile.c | |
parent | 87c1466625cff9ab2ea1a068703ef07a801d21d3 (diff) | |
download | ruby-2c300b14260052c0a56fa368d22576053440f33a.tar.gz |
compile.c: pop coverage trace
* compile.c (iseq_compile_each0): pop trace for coverage only and
clear its corresponding line. [ruby-core:82726] [Bug #13886]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6594,7 +6594,8 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int popp ((INSN *)saved_last_element)->insn_id == BIN(trace)) { POP_ELEMENT(ret); /* remove trace(coverage) */ - if (((INSN *)ret->last)->insn_id == BIN(trace)) { + if (IS_INSN_ID(ret->last, trace) && + (FIX2LONG(OPERAND_AT(ret->last, 0)) & RUBY_EVENT_COVERAGE)) { POP_ELEMENT(ret); RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), line - 1, Qnil); } |