Hi,
In message "Re: [ruby-core:21709] [Feature #1084] request for: Array#sort_by!"
on Sun, 1 Feb 2009 11:11:26 +0900, Radosaw Buat <redmine / ruby-lang.org> writes:
|sort and sort! override it's version from Enumerable and sort_by is directly from Enumerable, but for symmetry and consistency it would be nice to have destructive sort_by! for Array.
Despite how you expect, sort_by! is not faster than sort_by at all.
In fact, it would use sort_by internal then replace the receiver. Do
you still want the "dangerous" version?
matz.