On May 7, 2004, at 9:58 AM, Elias Athanasopoulos wrote: > Hello! > > Is there something similar to method_missing for classes? > > I.e. overload a method of Object or handle an exception > when a 'Foo.new' is called and class Foo does not exist. Something like this? def Object.const_missing(sym) Object.const_set( sym, Class.new() ) end ==>nil Foo.new ==>#<Foo:0x3c408> Bar.new ==>#<Bar:0x398d4> Baz.new ==>#<Baz:0x21370>