diff --git a/README.md b/README.md index 22547428d..78d3ded4f 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `range` supporting `stop` as positional argument ([#28708]). -* `mapslices` with `dims` keyword argument ([#27828]). - * `hasproperty` and `hasfield` ([#28850]). `hasproperty` is defined only for Julia 0.7 or later. diff --git a/src/Compat.jl b/src/Compat.jl index addd90f3b..3d27c829c 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -82,12 +82,6 @@ end end end -# https://github.com/JuliaLang/julia/pull/27828 -if VERSION < v"0.7.0-beta.73" - Base.mapslices(f, A::AbstractArray; dims=error("required keyword argument `dims` missing")) = - mapslices(f, A, dims) -end - # https://github.com/JuliaLang/julia/pull/28302 if VERSION < v"0.7.0-beta2.169" const floatmin = realmin diff --git a/test/old.jl b/test/old.jl index 6962c12bb..af3edd6fd 100644 --- a/test/old.jl +++ b/test/old.jl @@ -1254,3 +1254,13 @@ let @test Compat.split(str, r"\.+:\.+"; limit=3, keepempty=false) == ["a","ba","cba.:.:.dcba.:."] @test Compat.split(str, r"\.+:\.+"; limit=3, keepempty=true) == ["a","ba","cba.:.:.dcba.:."] end + +# 0.7.0-beta.73 +let a = rand(5,5) + s = mapslices(sort, a, dims=[1]) + S = mapslices(sort, a, dims=[2]) + for i = 1:5 + @test s[:,i] == sort(a[:,i]) + @test vec(S[i,:]) == sort(vec(a[i,:])) + end +end diff --git a/test/runtests.jl b/test/runtests.jl index 5cd45f19f..cf416b7c1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -98,16 +98,6 @@ let @test_throws UndefKeywordError func5(x=2) end -# 0.7.0-beta.73 -let a = rand(5,5) - s = mapslices(sort, a, dims=[1]) - S = mapslices(sort, a, dims=[2]) - for i = 1:5 - @test s[:,i] == sort(a[:,i]) - @test vec(S[i,:]) == sort(vec(a[i,:])) - end -end - # 0.7.0-beta2.169 @test floatmin(Float16) == @eval $(Core.Intrinsics.bitcast(Float16, 0x0400)) @test floatmax(Float32) == @eval $(Core.Intrinsics.bitcast(Float32, 0x7f7fffff))