Skip to content

Commit

Permalink
Add Compat.REPL (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored and fredrikekre committed Jan 23, 2018
1 parent 0d0e025 commit edc9a63
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ Currently, the `@compat` macro supports the following syntaxes:
* `using Compat.Libdl` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25459]).

* `using Compat.REPL` is provided on versions older than 0.7, where this library is
not yet part of the standard library ([#25544]).

## New functions, macros, and methods

* `@views` takes an expression and converts all slices to views ([#20164]), while
Expand Down Expand Up @@ -483,6 +486,7 @@ includes this fix. Find the minimum version from there.
[#25249]: https://github.com/JuliaLang/julia/issues/25249
[#25402]: https://github.com/JuliaLang/julia/issues/25402
[#25459]: https://github.com/JuliaLang/julia/issues/25459
[#25544]: https://github.com/JuliaLang/julia/issues/25544
[#25545]: https://github.com/JuliaLang/julia/issues/25545
[#25571]: https://github.com/JuliaLang/julia/issues/25571
[#25629]: https://github.com/JuliaLang/julia/issues/25629
Expand Down
6 changes: 6 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,12 @@ else
import SuiteSparse
end

@static if VERSION < v"0.7.0-DEV.3500"
const REPL = Base.REPL
else
import REPL
end

# 0.7.0-DEV.1993
@static if !isdefined(Base, :EqualTo)
if VERSION >= v"0.6.0"
Expand Down
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,14 @@ end
# 0.7.0-DEV.3415
@test findall(x -> x==1, [1, 2, 3, 2, 1]) == [1, 5]

# 0.7.0-DEV.3500
module TestREPL
using Compat
using Compat.REPL
using Compat.Test
@test isdefined(@__MODULE__, :REPL)
end

if VERSION < v"0.6.0"
include("deprecated.jl")
end
Expand Down

0 comments on commit edc9a63

Please sign in to comment.