Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Compat.REPL #469

Merged
merged 1 commit into from
Jan 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -481,6 +484,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
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 @@ -1171,6 +1171,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