From: Hugh Sasse Staff Elec Eng Date: 2000-11-23T04:17:13+09:00 Subject: [ruby-talk:6525] Re: alias_method and > and < On Thu, 23 Nov 2000, Dave Thomas wrote: > Hugh Sasse Staff Elec Eng writes: > > > The operators > and < don't seem to be in the list of things one cannot > > override. So therefore I should be able to override them. Indeed, > > I can do > > def >(x) > > # ... > > end > > > > but I cannot get at the old versions. > > class Fixnum > alias :old_lt :< > def <(other) > puts "comparing" > old_lt(other) > end > end OK, but how do I do that in a module? alias doesn't work there either. I'm trying to write this once (DRY and all that) and then include it in the classes where I need it. > > > Regards > > > Dave > Hugh