From: mengx@... Date: 2002-02-01T23:41:30+09:00 Subject: Re: strange behavior I meant the implementation of Ruby could be changed to search proxies at runtime(or there is a limitation?). Afterall, Ruby is much more flexiable language than say, Java. But in a strange way, the current issue reminds me of Java's inner class :-). Thanks -Ted > > T> regarded as part of B. When C asks B for its constants, B does not search > T> its proxy. > > C don't ask for the constants of B > > C ask if it exist a constant in its scope, and if it don't exist it will > search in its class > > With your example > > > T> class A > T> AA = 1 > T> end > T> > T> class B < A > T> BB = 1 > T> class C > T> puts BB => 1 > T> puts AA => NameError > T> end > T> > T> end > > BB is found because it's defined in the scope of C > AA is not found because it's not defined in C, not in the scope of C, nor > in any classes parent of C > > > Guy Decoux >