summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-19 09:00:30 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-19 09:00:30 +0000
commitf1cdda48a96bc3b7ee866720e3697b2a7a47f10d (patch)
tree0adda0374460da562518795e845ed74438818d9d /eval.c
parent69b72764759596fa6d991d94abc3a55943079390 (diff)
* eval.c (ev_const_defined): need not to check if cbase->nd_class
is rb_cObject. * eval.c (ev_const_get): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index eb035df6ef..9da8d6130a 100644
--- a/eval.c
+++ b/eval.c
@@ -1427,7 +1427,7 @@ ev_const_defined(cref, id, self)
{
NODE *cbase = cref;
- while (cbase && cbase->nd_clss != rb_cObject) {
+ while (cbase) {
struct RClass *klass = RCLASS(cbase->nd_clss);
if (NIL_P(klass)) return rb_const_defined(CLASS_OF(self), id);
@@ -1448,7 +1448,7 @@ ev_const_get(cref, id, self)
NODE *cbase = cref;
VALUE result;
- while (cbase && cbase->nd_clss != rb_cObject) {
+ while (cbase) {
struct RClass *klass = RCLASS(cbase->nd_clss);
if (NIL_P(klass)) return rb_const_get(CLASS_OF(self), id);