From: Alex Young Date: 2006-05-21T21:52:56+09:00 Subject: Re: Ruby namespaces and require transfire@gmail.com wrote: > Austin may be right that there are too many problems with doing this > effectively as a standard. But I'm not yet sure of that. All I have > seen for sure is the problem of core extensions, which like I said can > be resolved using a prefix '::'. That does feel clumsy. It's a simple fix, I know, but it's still clumsy. > Of course one should be careful not to > reference things in the absolute but rather in the relative. For > instance, never do: > > class X > def X.foo > > but always > > class X > def self.foo Why? irb(main):001:0> class X; end => nil irb(main):002:0> module Y; class X; def X.foo; end; end; end => nil irb(main):003:0> Y::X.methods - X.methods => ["foo"] -- Alex