Skip to content

Commit

Permalink
Drop compat code for get on ENV from #430
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 8b628e7 commit 326d1b1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Currently, the `@compat` macro supports the following syntaxes:
* `@compat finalizer(func, obj)` with the finalizer to run as the first argument and the object to be finalized
as the second ([#24605]).

* `get` do-block syntax supported when using `ENV` ([#23412]).

* `Some{T}` wraps `T` to signify that a result of `T<:Void` is expected ([#23642]).

* `replace` accepts a pair of pattern and replacement, with the number of replacements as
Expand Down
7 changes: 0 additions & 7 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ import Base64

include("compatmacro.jl")

# 0.7.0-DEV.1499
if VERSION < v"0.7.0-DEV.1499"
function Base.get(f::Base.Callable, ::Base.EnvHash, k::AbstractString)
Base.access_env(k->f(), k)
end
end

# 0.7.0-DEV.2919
@static if !isdefined(Base, :ComplexF16)
const ComplexF16 = Complex{Float16}
Expand Down
6 changes: 6 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -532,3 +532,9 @@ end
# 0.7.0-DEV.2687, 0.7.0-DEV.4527
@test isa(BitVector(undef, 2), BitVector)
@test isa(BitArray(undef, 2, 2), BitMatrix)

# 0.7.0-DEV.1499
let key = "TEST_23412"
@test !haskey(ENV, key)
@test get(() -> "default", ENV, key) == "default"
end
6 changes: 0 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ let A = [1]
@test x == 1
end

# 0.7.0-DEV.1499
let key = "TEST_23412"
@test !haskey(ENV, key)
@test get(() -> "default", ENV, key) == "default"
end

# 0.7.0-DEV.2919
@test ComplexF16 === Complex{Float16}
@test ComplexF32 === Complex{Float32}
Expand Down

0 comments on commit 326d1b1

Please sign in to comment.