From: Charles Oliver Nutter Date: 2008-08-05T04:49:27+09:00 Subject: [ruby-core:18124] Re: [Ruby 1.8 - Bug #252] Array#sort doesn't respect overridden <=> Nobuyoshi Nakada wrote: > Hi, > > At Thu, 10 Jul 2008 16:44:33 +0900, > Vladimir Sizikov wrote in [ruby-core:17720]: >> This seems to be a common performance trick in MRI, esp. for Fixnums and Strings. >> >> Looking at array.c (sort_2), indeed Fixnums and Strings are special-cased. > > I've forgotten to post this patch. So this is going to be a behavioral change now? My reading of the patch tells me it's now checking to see if <=> has been overridden and if so using the path that actually calls it. As Ryan pointed out, this would be new behavior. Can we get an official ruling on what is correct in 1.8 and 1.9.x? - Charlie