From: Robert Dober Date: 2006-05-25T06:01:29+09:00 Subject: Re: Overriding Time.now ------=_Part_180679_19592986.1148504486460 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 5/24/06, Logan Capaldo wrote: > > > On May 24, 2006, at 3:55 PM, Robert Dober wrote: > > [snip] > You are declaring a new class named Time in your module. Of course, I completely screwed up! Sorry for the noise. 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 > > > --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_180679_19592986.1148504486460--