class YARD::Docstring
def stable_sort_by(list)
-
(Array)
- a stable sorted list.
Parameters:
-
list
(Enumerable
) -- the list to sort.
def stable_sort_by(list) list.each_with_index.sort_by {|tag, i| [yield(tag), i] }.map(&:first) end