Here is a nested class definition:

class A
  class B
  end
end

Now, if I have a reference to class B from somewhere:

def get_reference
  A::B
end

reference_b = get_reference

How can I get a reference to the enclosing class A?

I can't do this by symbol lookup since class A (and B for that matter)
are anonymous. Am I going to have to explicitly create a
back-reference to the enclosing class at the time that I create class
B?

Thanks
-John
http://www.iunknown.com