From: ara.t.howard@... Date: 2006-04-08T00:37:34+09:00 Subject: autorequire.rb just hacked this out - can anyone see holes in it? harp:~ > cat autorequire.rb class Module alias_method "const_missing!", "const_missing" def const_missing c lib4 = lambda{|k| k.to_s.downcase.gsub(%r/::/, File::SEPARATOR)} lib = Object == self ? lib4[c] : lib4["#{ name }::#{ c }"] begin; require lib; rescue LoadError; end const_missing! c unless const_defined? c const_get c end end if $0 == __FILE__ p Object p CGI p CGI::Session p PStore p K end harp:~ > ruby autorequire.rb Object CGI CGI::Session PStore autorequire.rb:7:in `const_missing': uninitialized constant K (NameError) from autorequire.rb:17 regards. -a -- be kind whenever possible... it is always possible. - h.h. the 14th dali lama