T. Onoma schrieb:
> I've tried it three times. Unless I'm missing something it doesn't fly:
> 
>   module Tes
>     class Object
>       def t
>           puts "x"
>       end
>     end
>   end
> 
>   include Tes
>   o = Object.new
>   o.t
> 
>   #=> undefined method `t' for #<Object:0x402a8d7c> (NoMethodError)

Hi T.,

the Object class you define in module Tes isn't the top-level class Object but 
the new class Tes::Object. So either change the calling code to

   # include Tes    <-- not needed anymore
   o = Tes::Object.new
   o.t

or don't define a new class in Tes but simply include the module in the 
top-level class Object:

   module Tes
     def t
       puts "x"
     end
   end

   class Object
     include Tes
   end

   o = Object.new
   o.t

or extend only the new Object instance with the module:

   module Tes
     def t
       puts "x"
     end
   end

   o = Object.new
   o.extend Tes
   o.t

Regards,
Pit