On Sat, 11 Dec 2010 22:25:17 +0900, zuerrong wrote:

> Hello,
> 
> class Myclass
>     def Myclass.hi
>          "hi"
>     end
>     def Myclass::hello
>          "hello"
>     end
> end
> 
> what's the difference between Myclass.hi and Myclass::hello here?
> 
> Thanks.

Quoting Pickaxe (p349):

The only difference between :: and . occurs with uppercase identifiers. 
Ruby will assume that receiver::Thing is actually an attempt to access a 
constant named Thing unless the method invocation has a parameter list 
between parentheses





-- 
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/