On Wednesday 25 August 2004 05:45 am, Pit Capitain wrote:
>[snip]
> 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:
> [snip]
> Regards,
> Pit

Thanks Pit. Just to be clear, I am indeed attempting to accomplish exactly 
what my original example pretends to do. I have some modifications for the 
the core ruby libs (like Object) and I was hoping that I could encapsulate 
them in a namespace and then "reload" them into the toplevel at a later point 
in execution.  In effect gaining (somewhat) dynamically controllable core 
class modifications. While not nearly as concise as I had hoped, your 2nd 
example above can be made to do the job. Thanks!

T.