summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--eval.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f984d1784a..7e3f39d944 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 22 13:38:57 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (ev_const_get): should support constant access from
+ within instance_eval(). [ruby-dev:28327]
+
Thu May 18 17:51:32 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* time.c (time_timeval): should round for usec floating
diff --git a/eval.c b/eval.c
index 4698c34021..eebb663bcf 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