From: matz@... (Yukihiro Matsumoto) Date: 2003-09-04T20:56:24+09:00 Subject: Re: warning: toplevel constant XX referenced by YY::XX Hi, In message "Re: warning: toplevel constant XX referenced by YY::XX" on 03/09/04, Thomas writes: |Since you ask, I don't think it is intuitive that a qualified constant |reference like MyModule::Object searches the toplevel scope. Ruby |issues an unconditional warning when this happens, so I guess neither |do you. Why not just change ruby to not search the toplevel scope for |qualified constant references? I would think few existing applications |rely on the existing behaviour. Yes, but I think we need to wait for a while to make a transition. So can you wait for a moment, probably until 1.8.1? By the way, you may have problems also for constant name conflict. module Foo Foo1 = 42 end class Bar include Foo def Bar.const_missing(id) id end end p Bar::Foo1 p Bar::Foo2 Is it OK for you? matz.