module Enumerable

Public Instance Methods

stable_sort() click to toggle source
# File lib/rubustrings/action.rb, line 184
def stable_sort
  sort_by.with_index { |x, idx| [x, idx] }
end
stable_sort_by() { |x| ... } click to toggle source
# File lib/rubustrings/action.rb, line 188
def stable_sort_by
  sort_by.with_index { |x, idx| [yield(x), idx] }
end