From: Paul Lutus Date: 2006-10-24T17:15:21+09:00 Subject: Re: Override Time#to_s -- how? Ben Winekur wrote: > Hey everyone, > > I'd like to override the Time#to_s function to parse Time objects a > specific way -- how can I do this from within my script? (Without > modifying the Time class itself) Please state the goal, not the imagined solution. There are any number of ways to solve a problem using Ruby, but only if the problem is revealed. If you really don't want to modify the Time class, why not subclass Time and put your special handling in the derviced class? This is the classical approach to the goal you have stated. -- Paul Lutus http://www.arachnoid.com