From: pharrington Date: 2009-12-01T07:20:22+09:00 Subject: Re: Problem trying to get a constant with correct scope On Nov 30, 4:15 pm, Alexandre Mutel wrote: > I'm trying to get a constant inside a class (but i have to do it outside > the declaration) > > module A >   class B >   end >   class C >   end > end > > How to get constant B from inside C but executed from outside first > declaration? > After module A is declared, trying : > > >>> puts A::C.class_eval("B") > > failed and const_get is not working too. Your goal is confusing. module A contains the "B" constant, not class C. How does "A::B" not satisfy your needs? What exactly are you trying to do?