aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 23816a6cfd..203dce4a96 100644
--- a/compile.c
+++ b/compile.c
@@ -6593,6 +6593,11 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int popp
ret->last == saved_last_element &&
((INSN *)saved_last_element)->insn_id == BIN(trace)) {
POP_ELEMENT(ret);
+ /* remove trace(coverage) */
+ if (((INSN *)ret->last)->insn_id == BIN(trace)) {
+ POP_ELEMENT(ret);
+ RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), line - 1, Qnil);
+ }
}
debug_node_end();