Forum: Ruby module lookup starting with "::"

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Py J. (Guest)
on 2009-05-04 04:09
hello, could anyone explain why sometimes a module is
referenced with "::" before its name? like in


is it equivalent to the regular form "A::B::C"?

Jason R. (Guest)
on 2009-05-04 04:27
(Received via mailing list)
It's simply saying "do the lookup starting at the global scope and work
down" instead of "go up the scope hierarchy until you find what I'm
Useful in the case where you might have similarly named classes in
scopes and need to specify exactly which class you want.

Py J. (Guest)
on 2009-05-04 04:43
thanks Jason, very clear explanation.
This topic is locked and can not be replied to.