Hmm. With all that excitement about singleton classes, I forgot the most
basic way of getting access to a method which you have overridden: alias.
Taking the original code from [ruby-talk:68080], probably all you wanted was
alias :oldcmp <=>
def <=>(other)
if @@intpattern =~ self && @@intpattern =~ other
to_i <=> other.to_i
else
if @@casesensitive
super
else
downcase.oldcmp(other.downcase)
end
end
end
I will try to think twice before posting in future... it's just that the
posting helps me to think :-)
Regards,
Brian.