From: Gavin Sinclair Date: 2003-02-09T22:30:46+09:00 Subject: Re: Where is Math.PI ?? On Monday, February 10, 2003, 12:23:08 AM, Jason wrote: > Mark Slagell wrote: >> For what it's worth, I think you can use '::' in place of '.' whenever >> you want, but not vice versa. >> >> Anyway you need '::' when referring to constants, although orthodox >> style is to use '.' for method calls. > I've read somewhere that matz recommends using :: for class methods and > . for instance methods. Maybe in Ruby in a Nutshell? I prefer . for class methods because it's the same mechanism. You are calling a method on a receiver. It's just that the receiver is a class (since classes are objects, and they have "self", there is no difference). Gavin