Pit Capitain schrieb: > The only gotchas are that you should make sure that the original #to_s > method is used, and you'd have to add a special case for singleton > classes of modules: > > p class << Module; self; end # => #<Class:Module> Tom, sorry for the noise, but you can create pathological situations where you can't get at the module via its name: obj = M = Module.new obj.to_s Object.class_eval do remove_const "M" end p class << obj; self; end # => #<Class:M> p Object.const_get("M") rescue p $! # => #<NameError: M> Maybe someone doing this deserves some troubles... Regards, Pit