Skip to content

Commit 42c088b

Browse files
Fix errors in sort docstring (#52098)
Two chagnes wrapped into one `Base.copymutable` => `Base.copymutable` & `collect` and `Base.copymutable` => `similar` & words. Followup for #52086 and #46104; also fixes #51932 (though we still may want to make `copymutable` public at some point) --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent 29d78fa commit 42c088b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/sort.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,8 @@ end
14741474
14751475
Variant of [`sort!`](@ref) that returns a sorted copy of `v` leaving `v` itself unmodified.
14761476
1477-
Uses `Base.copymutable` to support immutable collections and iterables.
1477+
Returns something [`similar`](@ref) to `v` when `v` is an `AbstractArray` and uses
1478+
[`collect`](@ref) to support arbitrary non-`AbstractArray` iterables.
14781479
14791480
!!! compat "Julia 1.10"
14801481
`sort` of arbitrary iterables requires at least Julia 1.10.

0 commit comments

Comments
 (0)