>===== Original Message From ts <decoux / moulon.inra.fr> =====
>>>>> "B" == Benjamin J Tilly <ben_tilly / operamail.com> writes:
>
>B>   p [StringReverse.new("hello"), StringReverse.new("world")].sort
>
> When no block is given, #sort is hard-coded if the 2 elements are FIXNUM
> or String
>
Ick?

I would think that a better optimization would be to instead
implement sort internally as a Schwartzian sort - do the method
lookups on the way in so they are immediately available inside.
That would still get a speed boost, but would move the breakage
to the case of someone trying to redefine their methods inside
of the comparison.  I kind of feel that anyone trying to do
that deserves what they get...

Cheers,
Ben