Skip to content

Commit

Permalink
Drop compat code for isuppercase and friends from #516
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 9d7f3f4 commit 6e3a012
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `findin(a, b)` is now `findall(in(b), a)` ([#24673]).

* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`,
`uppercasefirst` and `lowercasefirst` ([#26442]).

* `Compat.split` and `Compat.rsplit` accept `keepempty` keyword argument
if `splitter` is given as second argument ([#26634])

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

if VERSION < v"0.7.0-DEV.4585"
export isuppercase, islowercase, uppercasefirst, lowercasefirst
const isuppercase = isupper
const islowercase = islower
const uppercasefirst = ucfirst
const lowercasefirst = lcfirst
end

if VERSION < v"0.7.0-DEV.4064"
for f in (:mean, :median, :var, :varm, :std, :cov, :cor)
@eval import .Statistics: $f # compatibility with old Compat versions
Expand Down
8 changes: 8 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -859,3 +859,11 @@ end

# 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')
@test islowercase('a')
@test !islowercase('A')
@test uppercasefirst("qwerty") == "Qwerty"
@test lowercasefirst("Qwerty") == "qwerty"
8 changes: 0 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ if VERSION < v"0.7.0-DEV.4592"
@test findall(occursin([1, 2]), [1]) == [1]
end

# 0.7.0-DEV.4585
@test isuppercase('A')
@test !isuppercase('a')
@test islowercase('a')
@test !islowercase('A')
@test uppercasefirst("qwerty") == "Qwerty"
@test lowercasefirst("Qwerty") == "qwerty"

# 0.7.0-DEV.4064
# some tests are behind a version check below because Julia gave
# the wrong result between 0.7.0-DEV.3262 and 0.7.0-DEV.4646
Expand Down

0 comments on commit 6e3a012

Please sign in to comment.