From: Rimantas Liubertas Date: 2008-07-13T10:42:36+09:00 Subject: Re: Modules >> >> Foo.zim # works, OK, fair enough >> 2 >> >> Foo::zim # works, but why have two syntaxes that do the same? >> 2 objec.method works for any object. Everything is an object, so Foo is an object too. Class::method, Module::method works with class/module methods only. >> >> SomeClass.zim # NoMethodError, huh? Why doesn't this work? >> >> SomeClass.new.zim # NoMethodError. Let's take a different angle: >> class Baz >> def Baz.qux # class method. you can look at it as a singleton method for Baz >> 3 >> end >> end => nil >> Baz.qux => 3 >> Baz.new.qux # class method is not available to the instance NoMethodError: undefined method `qux' for # from (irb):7 from :0 Thus zim exists only for the object of the Foo module - not any class that mixes in Foo, just for THE Foo itself. Regards, Rimantas -- http://rimantas.com/