diff --git a/README.md b/README.md index df7258ad7..d8665a9e6 100644 --- a/README.md +++ b/README.md @@ -338,9 +338,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `object_id` is now `objectid` ([#25615]). -* `DevNull`, `STDIN`, `STDOUT` and `STDERR` are now `devnull`, `stdin`, `stdout` and - `stderr` respectively ([#25959]). - * `LinSpace` is now `LinRange` ([#25896]). * `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`, diff --git a/src/Compat.jl b/src/Compat.jl index b17076f85..6a442a966 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -7,31 +7,6 @@ import Sockets include("compatmacro.jl") -@static if !isdefined(Base, :devnull) #25959 - export devnull, stdout, stdin, stderr - const devnull = DevNull - for f in (:stdout, :stdin, :stderr) - F = Symbol(uppercase(string(f))) - rf = Symbol(string("_redirect_", f)) - @eval begin - $f = $F - # overload internal _redirect_std* functions - # so that they change Compat.std* - function Base.$rf(stream::IO) - ret = invoke(Base.$rf, Tuple{Any}, stream) - global $f = $F - return ret - end - end - end - # in __init__ because these can't be saved during precompiling - function __init__() - global stdout = STDOUT - global stdin = STDIN - global stderr = STDERR - end -end - @static if !isdefined(Base, Symbol("@nospecialize")) # 0.7 macro nospecialize(arg) diff --git a/test/old.jl b/test/old.jl index 648991db0..3f1710336 100644 --- a/test/old.jl +++ b/test/old.jl @@ -13,3 +13,13 @@ module TestSockets @test ip"127.0.0.1".host == UInt32(2130706433) end + +# tests of removed functionality (i.e. justs tests Base) + +# 25959 +@test all(x -> isa(x, IO), (devnull, stdin, stdout, stderr)) +@static if !isdefined(Base, :devnull) + @test stdin === STDIN + @test stdout === STDOUT + @test stderr === STDERR +end diff --git a/test/runtests.jl b/test/runtests.jl index def808796..2fab9bc7a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -905,14 +905,6 @@ import Compat.Markdown @test repr("text/plain", "string") == "\"string\"" #25990 @test showable("text/plain", 3.14159) #26089 -# 25959 -@test all(x -> isa(x, IO), (devnull, stdin, stdout, stderr)) -@static if !isdefined(Base, :devnull) - @test stdin === STDIN - @test stdout === STDOUT - @test stderr === STDERR -end - # 0.7.0-DEV.3526 module TestNames export foo