Hi,

Am Donnerstag, 10. Mai 2007, 03:52:55 +0900 schrieb Marcin Raczkowski:
> On Wednesday 09 May 2007 18:40, robninja / gmail.com wrote:
> > As I understand it the double-colon ( :: ) can be used when calling
> > class methods or class constants, but could correctly be replaced by a
> > single dot ( . ) if preferred:
> 
> If i remember correctly you use :: for Classes, constants etc and . for 
> methods, it was here before - read archives first

Classes are mostly referred to by constants

  class C
    X = "x"
    class << self 
      def X ; "y" ; end
    end
  end

  c = C  # C is a constant

  cobj = c.new

  c::X   # => "x"
  c.X    # => "y"
  C::X   # => "x"
  C.X    # => "y"

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de