_why
10/5/2008 4:23:00 PM
On Sat, Oct 04, 2008 at 07:13:03AM +0900, Stephen Celis wrote:
> On Fri, Oct 3, 2008 at 2:51 PM, Patrick Doyle <wpdster@gmail.com> wrote:
> > Well, there is one difference -- the last one returns a different value for
> > B. I'm not sure what that buys you, but it's the thing that dumbfounds me
> > the most about this issue.
>
> I believe this is an issue of scope, A.c is picking up #<Class:A>::B,
> whereas the others are picking up A::B.
What it buys you is a namespace that cannot be addressed from the
top-level. If you want to create temporary classes that don't
pollute the top-level but can address each other, you can create
them in the singleton class of an object.
A::B can be addressed from anywhere, whereas #<Class::A>::B
cannot (not by that name.)
_why