diff options
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 508ad8584e..3398b958ab 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1164,7 +1164,12 @@ vm_get_ev_const(rb_thread_t *th, const rb_iseq_t *iseq, } cref = root_cref; while (cref && cref->nd_next) { - klass = cref->nd_clss; + if (cref->flags & NODE_FL_CREF_PUSHED_BY_EVAL) { + klass = Qnil; + } + else { + klass = cref->nd_clss; + } cref = cref->nd_next; if (!NIL_P(klass)) { |