Sort stability: Difference between revisions

m
→‎{{header|Ruby}}: Use correct list of methods.
(→‎{{header|Ruby}}: Distinguish JRuby from MRI.)
m (→‎{{header|Ruby}}: Use correct list of methods.)
Line 558:
 
=={{header|Ruby}}==
Ruby's built-in sort methods (Array#sort, Array#sort!, Array#sort_by!, Enumerable#sort and Enumerable#sort_by) are not stable. [[MRI]] uses [[Sorting algorithms/Quicksort|quicksort]], which is not stable [http://groups.google.com/group/comp.lang.ruby/msg/2a6c50d173a902da? (1)]. It seems that stable sorting is not worth the performance trade-off; MRI rejected a proposal to switch to a stable sort [http://redmine.ruby-lang.org/issues/show/1089 (2)].
 
{{works with|MRI|1.8.7, 1.9.2}}
Anonymous user