diff --git a/compile.c b/compile.c index 2672b3b2e0..6aca1230af 100644 --- a/compile.c +++ b/compile.c @@ -8334,6 +8334,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in debugp_param("lit", node->nd_lit); if (!popped) { ADD_INSN1(ret, line, putobject, node->nd_lit); + RB_OBJ_WRITTEN(iseq, Qundef, node->nd_lit); } break; }