>>>>> "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.


Guy Decoux