From: Yukihiro Matsumoto Date: 2009-11-06T16:14:20+09:00 Subject: [ruby-core:26558] Re: [Feature #1089] Stable sorting for sort and sort_by Hi, In message "Re: [ruby-core:26557] [Feature #1089] Stable sorting for sort and sort_by" on Fri, 6 Nov 2009 12:00:35 +0900, Kornelius Kalnbach writes: |I'm not sure why the proposal was rejected. Can somebody explain? As far as I know, sort stability is rarely required, not worthy for slows down sorting in general. If there's stable sort routine faster than current one, please tell me. |If we don't want to change the #sort implementation for performance reasons, I can open another ticket for the request of an alternative, fast and stable sort method in core Ruby. I still think that Ruby should have a core method for stable sorting. If you really need stable sort, you can do so using sort_by pretty easily. i = 0 ary.sort_by{|x| [x, i += 1] } matz.