From 76bfb983e89e269640494918e05db45c359abdf6 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 22 May 2006 04:41:36 +0000 Subject: * eval.c (ev_const_get): should support constant access from within instance_eval(). [ruby-dev:28327] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 4698c3402..eebb663bc 100644 --- a/eval.c +++ b/eval.c @@ -1892,7 +1892,7 @@ ev_const_get(cref, id, self) } cbase = cbase->nd_next; } - return rb_const_get(cref->nd_clss, id); + return rb_const_get(NIL_P(cref->nd_clss) ? CLASS_OF(self): cref->nd_clss, id); } static VALUE -- cgit