diff --git a/README.md b/README.md index 14aeb68db..b9bc5f3b6 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,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 508d4e038..cb88d9bc3 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 b00440761..f07474bea 100644 --- a/test/old.jl +++ b/test/old.jl @@ -1246,3 +1246,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 7a83fac2e..1e543c7f6 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -110,16 +110,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))