From: Joel VanderWerf Date: 2004-12-02T14:55:04+09:00 Subject: Re: Accessing class constants from within a module? Jos Backus wrote: > Any idea how I can access a class constant from within a module when that > module is include'd in the class? I.o.w. how do I make this work? Use dynamic lookup, rather than lexical lookup: > module Debug > def debug(level, msg) > puts msg unless level > DEBUG # XXX DEBUG is wrong! puts msg unless level > self.class::DEBUG > end > end