summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index c541711ff99..a73a5be9a1f 100644
--- a/compile.c
+++ b/compile.c
@@ -3088,6 +3088,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
*/
int stop_optimization =
ISEQ_COVERAGE(iseq) && ISEQ_LINE_COVERAGE(iseq) &&
+ nobj->link.type == ISEQ_ELEMENT_INSN &&
nobj->insn_info.events;
if (!stop_optimization) {
INSN *pobj = (INSN *)iobj->link.prev;