Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corelib/enumerable.rb
Original file line number Diff line number Diff line change
@@ -858,7 +858,7 @@ def sort_by(&block)
arg = Opal.destructure(`arguments`)

[block.call(arg), arg]
}.sort.map { |arg| `arg[1]` }
}.sort { |a, b| a[0] <=> b[0] }.map { |arg| `arg[1]` }
end

alias select find_all

0 comments on commit 2fd8fa0

Please sign in to comment.