diff --git a/README.md b/README.md index f9965bae0..9e8432874 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,9 @@ Please check the list below for the specific syntax you need. ## Supported features -* `get` supports `CartesianIndex` when indexing `AbstractArrays` ([#30259]). (since Compat 3.10.0) +* `union` supports `Base.OneTo` ([#35577]). (since Compat 3.11.0) + +* `get` supports `CartesianIndex` when indexing `AbstractArrays` ([#30268]). (since Compat 3.10.0) * `similar(::PermutedDimsArray)` now uses the parent ([#35304]). (since Compat 3.9.0) @@ -150,4 +152,5 @@ Note that you should specify the correct minimum version for `Compat` in the [#34652]: https://github.com/JuliaLang/julia/issues/34652 [#34773]: https://github.com/JuliaLang/julia/issues/34773 [#35304]: https://github.com/JuliaLang/julia/pull/35304 -[#30259]: https://github.com/JuliaLang/julia/pull/30268 +[#30268]: https://github.com/JuliaLang/julia/pull/30268 +[#35577]: https://github.com/JuliaLang/julia/pull/35577 diff --git a/src/Compat.jl b/src/Compat.jl index 5452b4f04..34f59cc91 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -396,6 +396,11 @@ if VERSION < v"1.5.0-DEV.124" export isdisjoint end +# https://github.com/JuliaLang/julia/pull/35577 +if VERSION < v"1.5.0-DEV.681" + Base.union(r::Base.OneTo, s::Base.OneTo) = Base.OneTo(max(r.stop,s.stop)) +end + include("deprecated.jl") end # module Compat diff --git a/test/runtests.jl b/test/runtests.jl index 71caba318..1fdabeb57 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -400,4 +400,9 @@ end end end +# https://github.com/JuliaLang/julia/pull/35577 +@testset "union on OneTo" begin + @test union(Base.OneTo(3), Base.OneTo(4)) === Base.OneTo(4) +end + nothing