On Mon, Aug 05, 2002 at 07:37:50PM +0900, ts wrote: > >>>>> "T" == Tomasz Wegrzanowski <taw / users.sourceforge.net> writes: > > T> What I want is creation of constants at first request, > > Use begin ... rescue > > pigeon% ruby > module Foo > end > begin > p Foo::Bar.new > rescue NameError > Foo.const_set("Bar", Class.new) > retry > end > ^D > #<Foo::Bar:0x401b0914> > pigeon% > > and add the appropriate test to make it work cleanly. How can I find out which constant was missing ? Is it possible to put this code in module so program which uses the module doesn't have to catch anything ?