diff options
author | Yusuke Endoh <[email protected]> | 2023-09-04 19:51:40 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2023-09-04 19:52:08 +0900 |
commit | 4f4c1170bc988104f3bd3321558099af7ea19c18 (patch) | |
tree | 62a5dbd7abf53ef4776ad542118b45b6f1e4c9f0 /compile.c | |
parent | 4cc56592932d36c202b2366ffe7ad71db2f5ea0b (diff) |
Revert "Don't reset line coverage for evaled code. (#8330)"
This reverts commit 7e0f5df2f99693267d61636d23da47f79924e9d5.
https://bugs.ruby-lang.org/issues/19857#note-7
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -2336,8 +2336,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor) !(rb_get_coverage_mode() & COVERAGE_TARGET_ONESHOT_LINES)) { int line = iobj->insn_info.line_no - 1; if (line >= 0 && line < RARRAY_LEN(ISEQ_LINE_COVERAGE(iseq))) { - if (RARRAY_AREF(ISEQ_LINE_COVERAGE(iseq), line) == Qnil) - RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), line, INT2FIX(0)); + RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), line, INT2FIX(0)); } } if (ISEQ_BRANCH_COVERAGE(iseq) && (events & RUBY_EVENT_COVERAGE_BRANCH)) { |