I don't know if this is expected behavior. If it is, how do I work around it? I would like to get the fully qualified namespace path of the class, as in the second output line below. 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"