From: Logan Capaldo Date: 2006-05-25T05:42:37+09:00 Subject: Re: Overriding Time.now On May 24, 2006, at 3:55 PM, Robert Dober wrote: > On 5/24/06, Jim Weirich wrote: >> >> Molitor, Stephen L wrote: >> >> I believe that you can redefine Time.now in the scope where you >> need >> >> it without interfering with Test::Unit >> > >> > There's only one instance of the Time class object, and any >> changes you >> > make to it are in effect 'global'. > > > Although I do not understand it (this is not an anomaly of the > universe > though), it does not look like it > please kindly look at this You are declaring a new class named Time in your module. This may or not work for the OP. e.g.: % cat overriding_time.rb class Base def self.something_invovling_time_now Time.now end end module Wrap class Time def self.now "Whee" end end end class Child < Base include Wrap puts something_invovling_time_now puts Time.now end % ruby overriding_time.rb Wed May 24 16:42:11 EDT 2006 Whee