From e6540a035efb692f66ceead14a301f92b560bdd4 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 29 Jun 2011 05:20:37 +0000 Subject: [PATCH] * variable.c (rb_const_get_0): should not look for superclasses if the second optional argument is given for #const_get(). fix [Bug #3422] [Bug #3423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ variable.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5cc4987e98..536e688076 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 29 13:55:36 2011 Yukihiro Matsumoto + + * variable.c (rb_const_get_0): should not look for superclasses if + the second optional argument is given for #const_get(). + fix [Bug #3422] [Bug #3423] + Wed Jun 29 12:07:27 2011 Eric Hodel * math.c: Attach documentation for Math. diff --git a/variable.c b/variable.c index 2de5eccf93..ef7e3f6138 100644 --- a/variable.c +++ b/variable.c @@ -1613,7 +1613,7 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, int visibility) } return value; } - if (!recurse && klass != rb_cObject) break; + if (!recurse) break; tmp = RCLASS_SUPER(tmp); } if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {