From: thomass@... (Thomas) Date: 2003-09-02T18:51:29+09:00 Subject: warning: toplevel constant XX referenced by YY::XX Is there a way to turn the warning in subj. into an error? I'm trying to use const_missing to dynamically look up stuff when it is referenced, but now I'm in trouble because e.g. System::GC does not invoke Module#const_missing because GC is already defined at the toplevel. Any ideas? Isn't ruby behaving strangely here? It seems to me that Module#const_missing is mostly useless if it doesn't work with all the names that happen to be defined in the global scope. Cheers, Thomas ####### Example: module M1 def self.const_missing(aSymbol) puts "Looking for #{aSymbol}" end end M1::Object (irb):16: warning: toplevel constant Object referenced by M1::Object => Object M1::SomethingElse Looking for SomethingElse => nil