1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* variable.c (rb_const_get_0): Object should have been the lowest

in const lookup precedence.  [ruby-dev:28343]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-02-20 01:07:40 +00:00
parent a25ab42137
commit 61ef2fa9f6
2 changed files with 15 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Mon Feb 20 10:03:59 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* variable.c (rb_const_get_0): Object should have been the lowest
in const lookup precedence. [ruby-dev:28343]
Mon Feb 20 09:17:11 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/delegate.rb (Delegator): should not delegate "funcall".

View file

@ -1302,16 +1302,16 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, NODE *fallback)
}
}
if (recurse) {
if (!n_retry) {
n_retry = 1;
tmp = rb_cObject;
goto retry;
}
if (fallback) {
tmp = fallback->nd_clss;
fallback = fallback->nd_next;
goto retry;
}
if (!n_retry) {
n_retry = 1;
tmp = rb_cObject;
goto retry;
}
}
return const_missing(klass, id);
}
@ -1469,16 +1469,16 @@ rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse, NODE* fallback)
tmp = RCLASS(tmp)->super;
}
if (recurse) {
if (!n_retry) {
n_retry = 1;
tmp = rb_cObject;
goto retry;
}
if (fallback) {
tmp = fallback->nd_clss;
fallback = fallback->nd_next;
goto retry;
}
if (!n_retry) {
n_retry = 1;
tmp = rb_cObject;
goto retry;
}
}
return Qfalse;
}