summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-03 18:25:57 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-03 18:25:57 +0000
commit4aa8e0f64f649c152d35d1f606249304a7749a24 (patch)
treee6bb9639b21f89e4f250fe523e3602e6abc05bc5 /eval.c
parentc5f7e80d46bffa843afbb8df8369c843ccfa30ae (diff)
downloadruby-4aa8e0f64f649c152d35d1f606249304a7749a24.tar.gz
ruby-4aa8e0f64f649c152d35d1f606249304a7749a24.tar.xz
ruby-4aa8e0f64f649c152d35d1f606249304a7749a24.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@25984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 9ac63889c..c5a72dc60 100644
--- a/eval.c
+++ b/eval.c
@@ -274,7 +274,8 @@ rb_mod_nesting(void)
while (cref && cref->nd_next) {
VALUE klass = cref->nd_clss;
- if (!NIL_P(klass)) {
+ if (!(cref->flags & NODE_FL_CREF_PUSHED_BY_EVAL) &&
+ !NIL_P(klass)) {
rb_ary_push(ary, klass);
}
cref = cref->nd_next;