diff --git a/README.md b/README.md index 17f0ebc76..9b5701fb5 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,6 @@ Currently, the `@compat` macro supports the following syntaxes: ## Renaming -* `Compat.indexin` accepts any iterable as first argument, returns `nothing` (rather than `0`) - for entries with no match and gives the index of the first (rather than the last) match - ([#25662], [#25998]). - * `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`, `uppercasefirst` and `lowercasefirst` ([#26442]). diff --git a/src/Compat.jl b/src/Compat.jl index f056c32e7..e92b2d42d 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -76,19 +76,6 @@ end end end -if VERSION < v"0.7.0-DEV.3972" - function indexin(a, b::AbstractArray) - inds = keys(b) - bdict = Dict{eltype(b),eltype(inds)}() - for (val, ind) in zip(b, inds) - get!(bdict, val, ind) - end - return Union{eltype(inds), Nothing}[ - get(bdict, i, nothing) for i in a - ] - end -end - if VERSION < v"0.7.0-DEV.4585" export isuppercase, islowercase, uppercasefirst, lowercasefirst const isuppercase = isupper diff --git a/test/old.jl b/test/old.jl index 8a7d2ef77..62634fc74 100644 --- a/test/old.jl +++ b/test/old.jl @@ -864,3 +864,6 @@ mktempdir(@__DIR__) do dir end @test readdir(dir) == ["dest.jl"] end + +# 0.7.0-DEV.3972 +@test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing] diff --git a/test/runtests.jl b/test/runtests.jl index 1fae119d4..736bce3e9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -82,9 +82,6 @@ end @test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8 -# 0.7.0-DEV.3972 -@test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing] - # 0.7.0-DEV.4585 @test isuppercase('A') @test !isuppercase('a')