From: Intransition Date: 2010-06-07T04:41:58+09:00 Subject: Singleton classes and Namespce Do singleton classes not get the same namespace treatment as normal classes? module M class X; end end o = Object.new => # (class << o; self; end).class_eval{ include M } => # def o.x; X; end o.x => NameError: uninitialized constant X from (irb):6:in `x' from (irb):7 The "(class << o; self; end).class_eval{ include M }" is effectively the same as "o.extend M" but I want to emphasize the use of #include. It of course works fine if I use an explicit class. class O include M def x; X; end end O.new.x => M::X