diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-31 09:07:42 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-31 09:07:42 +0000 |
commit | 7487298584145058f2340dc7a6e4da8d21fe5248 (patch) | |
tree | f26be82f903d8f870d42fd0641175e2220719d3d /vm_insnhelper.c | |
parent | 4273aa8e722c88b04ff0828b6a3c9e6b25988231 (diff) |
* vm_insnhelper.c (vm_get_ev_const): should ignore crefs with
the NODE_FL_CREF_PUSHED_BY_EVAL flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)) { |