From: Dick Davies Date: 2005-02-18T05:53:04+09:00 Subject: Re: 2/24 = 0?; or, how do I add hours to a DateTime? * rpardee@comcast.net [0245 17:45]: > Let's say I liked that so much I wanted it available forevermore. I > assume I wouldn't want to edit DateTime.rb (I'm probably not empowered > to do so, actually). Is there some way to get custom code run every > time I hit the DateTime class? Or every time I fire up the ruby > interpreter? one way would be to call your file something like ubertime.rb containing something like: ----------------------------- require 'time' class Time def newmethod ... ... .. end end ----------------------------- then just require 'ubertime' in any scripts that want to use it. -- 'The State is the kind of organization which, though it does big things badly, does small things badly too.' -- John Kenneth Galbraith Rasputin :: Jack of All Trades - Master of Nuns