On 6/24/05, nobuyoshi nakada <nobuyoshi.nakada / ge.com> wrote:
> Hi,
> 
> At Fri, 24 Jun 2005 16:07:18 +0900,
> Mark Hubbart wrote in [ruby-talk:146353]:
> > What about adding a Kernel#const_get that does this? That might
> > separate things a little better; a global method that decodes any
> > class name, nested or not, based on current context.
> 
> Kernel also is one of modules.
> 
>   $ ruby -e 'p Kernel.const_get("Object")'
>   Object

I actually meant a private instance method defined in Kernel, like
Kernel#warn et al. I was thinking that it might make sense to call
either
  SomeNamespace.const_get("SomeConst")
or a plain
  const_get("Nifty::Nested::Namespaces")
which could be done from anywhere, and would use the current scope.

But differentiating between the two looks like it may be be more
confusing than it's worth (especially since the worth was dubious
anyway). I un-submit the idea.

cheers,
Mark