diff options
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |