From: Evan Webb Date: 2005-04-16T04:49:27+09:00 Subject: Re: Why specify module names redundantly in Modules? The reason the methods aren't available as methods of the module itself is because a module is a method container, ie it has a seperate method table for all the methods defined inside it. But that method table IS NOT the objects method table! By doing "extend self" you set the module to be a superclass of itself and thus it's own methods are available as methods of the module object by inheritence. "def self.bar" works the same way, but injects the method into the module's singleton superclass (it's singular metaclass), which is the first class listed in the objects inheritence list. Hope that helps clear it up and doesn't just add more confusion. Evan On 4/15/05, Paul Battley wrote: > Module Foo > def bar > "bar" > end > extend self > end > > puts Foo.bar > >