From: Henry Savr Date: 2006-08-18T02:21:13+09:00 Subject: Re: How to - Change operator behaviour Mark Van Holstyn wrote: > In your example, you would be calling the method '>' on t1... > > t1.>(t2) > > You can define > in the class you would like to have your functionality > in. > > class Example > def >( other ) > #do soem comparison > end > end Sorry, I see, that my initial question was not asked clearly. I know about the "> trick." The question actually was: I want to redefine a Time method > It's new behaviour should be like this: class Time1 < Time def >(other) case other.class.name when "Time" return self > other # but use the OLD > method definition. when ("NilClass") return true else # do what Ruby does originally in this case : when one operand is Time, and other not the Time. end end So question was 1. How to instruct Ruby to use OLD definition? 2. a)What Ruby does if it sees one parameter of Time class and other non-Time? b)How to say him to do the same? Thank you Henry -- Posted via http://www.ruby-forum.com/.