Skip to content

Commit

Permalink
Drop compat code for invpermute! from #445
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 734c8ac commit 382bc0b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `copy!` and `unsafe_copy!` are now `copyto!` and `unsafe_copyto!` ([#24808]).

* `ipermute!` is now `invpermute!` ([#25168]).

* `module_parent`, `Base.function_module`, and `Base.datatype_module` are now methods of
a new function called `parentmodule` ([#25629]).

Expand Down
6 changes: 0 additions & 6 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ end
end
end

# 0.7.0-DEV.3173
@static if !isdefined(Base, :invpermute!)
const invpermute! = ipermute!
export invpermute!
end

@static if VERSION < v"0.7.0-DEV.3172"
Base.replace(s::AbstractString, pat_rep::Pair; count::Integer=typemax(Int)) =
replace(s, first(pat_rep), last(pat_rep), count)
Expand Down
3 changes: 3 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -598,3 +598,6 @@ end
@test convert(Nothing, nothing) == nothing
@test_throws MethodError convert(Nothing, 1)
@test Some(nothing) != nothing

# 0.7.0-DEV.3173
@test invpermute!(permute!([1, 2], 2:-1:1), 2:-1:1) == [1, 2]
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ let A = [0, 0, 0], B = [1, 2, 3]
@test unsafe_copyto!(A, 2, B, 1, 1) === A == [0, 1, 0]
end

# 0.7.0-DEV.3173
@test invpermute!(permute!([1, 2], 2:-1:1), 2:-1:1) == [1, 2]

# 0.7.0-DEV.3172
@test replace("abcb", "b"=>"c") == "accc"
@test replace("abcb", "b"=>"c", count=1) == "accb"
Expand Down

0 comments on commit 382bc0b

Please sign in to comment.