diff options
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 13bbcf799b..0889e8aee9 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1032,12 +1032,12 @@ static NODE * vm_cref_push(rb_thread_t *th, VALUE klass, int noex) { rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(th, th->cfp); - NODE *cref = NEW_BLOCK(klass); + NODE *cref = NEW_NODE_LONGLIFE(NODE_BLOCK, klass, 0, 0); cref->nd_file = 0; cref->nd_visi = noex; if (cfp) { - cref->nd_next = vm_get_cref(cfp->iseq, cfp->lfp, cfp->dfp); + cref->nd_next = (NODE *)rb_gc_write_barrier((VALUE)vm_get_cref(cfp->iseq, cfp->lfp, cfp->dfp)); } return cref; |