Florian Groß
4/8/2007 11:24:00 AM
The :: operator and the . operator only behave differently when
constants are involved AFAIK.
Foo::Bar will only look for the constant and raise an exception
otherwise.
Foo::Bar() and Foo::Bar X will only look for a method.
Foo.Bar will only look for a method.
Otherwise the :: operator is equivalent to the . operator, even for
non-module/class objects:
5::to_s # => "5"
5::+ 6 # => 11