Greetings, On Mon, Jan 31, 2011 at 11:00 AM, Charles Oliver Nutter <headius@headius.com
wrote:
FWIW, JRuby originally had a stable Array#sort, but because it was slower than MRI's unstable sort (and we got bug reports to that effect) we replaced it with an unstable hybrid sort based on quicksort. Shortly after we did that, someone raised an issue against MRI to get it to move to a stable sort :)
As far as I know, MRI hasn't changed yet.
- Charlie
Yeah, I read a bit about that when I was making sure my advice was reasonable... I personally think the best option is to have a Enumerable#stable_sort, rather than replacing the default behavior, since it's rarer for folks to need a stable sort, but it'd still be nice for it to be natively implemented when they do. I, however, don't have the forceful personality necessary to cajole something like that through. :) -- Morgan