From: Dave Burt Date: 2005-05-28T11:25:19+09:00 Subject: Re: Difference between 'def self..' and module_function . Hi "Nikolai Weibull" , I think there are two differences: #NW> I thought I new [sic.] the difference between writing >> module A; def self.a; nil; end; end => nil #NW> and >> module B; def a; nil; end; module_function :a; end => B #NW> But I just realized I don't. Would someone mind explaining it to me? >> A.private_instance_methods => [] >> B.private_instance_methods => ["a"] The first, insignificant, difference is that module_function returns the module, so the result of the latter module definition is the module itself. The second difference is that the latter case leaves a private instance method behind. Cheers, Dave