From: "drbrain (Eric Hodel)" Date: 2013-06-12T03:21:59+09:00 Subject: [ruby-core:55442] [ruby-trunk - Feature #8422] add Enumerable#reverse_sort and Enumerable#reverse_sort_by Issue #8422 has been updated by drbrain (Eric Hodel). =begin Neither (({Prime.each.reverse_sort.take 10})) nor (({Prime.each.sort.take 10})) will return as there is no last value for infinite streams. You can neither reverse nor sort an infinite stream. I believe adding the feature to Enumerable doesn't fit with its existing functionality (all beginning-of-stream oriented). We need feedback from the submitter. Without it this issue should be closed. =end ---------------------------------------- Feature #8422: add Enumerable#reverse_sort and Enumerable#reverse_sort_by https://bugs.ruby-lang.org/issues/8422#change-39865 Author: Hanmac (Hans Mackowiak) Status: Feedback Priority: Normal Assignee: Category: Target version: they are better when you want descending order, enum.sort.reverse does work too, but it is to slow because it needs to build that result array twice they both can be defined just like #sort and #sort_by but negates the result of the compare block -- http://bugs.ruby-lang.org/