From 7dbfe89630f429255ae346cd02d7ca7d2d109650 Mon Sep 17 00:00:00 2001 From: shugo Date: Thu, 3 Dec 2009 18:25:57 +0000 Subject: * compile.c (compile_cpath, iseq_compile_each): reverted constant/class variable lookup in instance_eval etc. to the behavior of 1.8. * eval.c (rb_mod_nesting): ditto. * insns.def (putspecialobject, defineclass): ditto. * node.h (NODE_FL_CREF_PUSHED_BY_EVAL): ditto. * vm_core.h (VM_SPECIAL_OBJECT_CONST_BASE): ditto. * vm_eval.c (yield_under, eval_under): ditto. * vm_insnhelper.c (vm_cref_push, vm_get_const_base, vm_get_ev_const, vm_get_cvar_base): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 5581ea8439..54b513c4c8 100644 --- a/compile.c +++ b/compile.c @@ -2549,7 +2549,8 @@ compile_cpath(LINK_ANCHOR *ret, rb_iseq_t *iseq, NODE *cpath) } else { /* class at cbase Foo */ - ADD_INSN1(ret, nd_line(cpath), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + ADD_INSN1(ret, nd_line(cpath), putspecialobject, + INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE)); return Qtrue; } } @@ -3710,7 +3711,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) } if (node->nd_vid) { - ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE)); + ADD_INSN1(ret, nd_line(node), putspecialobject, + INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE)); ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(node->nd_vid)); } else { -- cgit v1.2.3