"Joel VanderWerf" <vjoel / PATH.Berkeley.EDU> wrote in > class Base > def Base.inherited(sub) > puts "In #inherited, subclass name is #{sub}" > super > end > end > > module Mod > class Sub < Base > puts "In class definition, subclass name is #{self}" > end > end > > # ==> In #inherited, subclass name is Sub > # ==> In class definition, subclass name is Mod::Sub > > RUBY_VERSION > # ==> "1.6.6" Well in cvs you could write ---------- class Base def Base.inherited(sub) puts "In #inherited, subclass name is #{sub}" super end end module Mod Class.new Base do |klass| Mod.const_set :Sub, klass end class Sub puts "In class definition, subclass name is #{self}" end end ---------- but I sort of have the feeling that this solution would not be a winning entry in a Ruby coding contest ... /Christoph