Submitted by legacy (Wed Sep 03 09:09:26 UTC 2003)
module M1
def self.const_missing(aSymbol) puts "Looking for #{aSymbol}" end
end M1::Blah # Prints "Looking ..."
M1::Object
I don't even understand why this is a warning in the first place, it should be an error, imho. And since ruby knows when to print the warning it should be straightforward to consult constant_missing first/instead.
Comments | Current voting | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
RCRchive copyright © David Alan Black, 2003-2005.
Powered by .