From: dblack@... Date: 2006-03-26T23:44:01+09:00 Subject: Re: Noob: use of the double colon Hi -- On Sun, 26 Mar 2006, Jonathan Leighton wrote: > While we're on the topic -- I've never exactly understood what placing > the double colon at the beginning does? eg... > > ::FooModule::FOO_CONSTANT > > ? It forces a top-level lookup. For example: class M class String end def initialize @ms = String.new # this will be M::String @str = ::String.new("abc") # this will be top-level string end end It's like a / at the beginning of a file path. David -- David A. Black (dblack@wobblini.net) Ruby Power and Light, LLC (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black