diff --git a/README.md b/README.md index c41848bbe..20b5b9cd1 100644 --- a/README.md +++ b/README.md @@ -224,11 +224,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]). -* `readstring` is replaced by methods of `read`. ([#22864]) - - `read(::IO, ::Type{String})`, `read(::AbstractString, ::Type{String})`, - and `read(::AbstractCmd, ::Type{String})` are defined for 0.6 and below. - * `Range` is now `AbstractRange` ([#23570]) * `select`* functions (`select`, `select!`, `selectperm`, `selectperm!`) are renamed to diff --git a/src/Compat.jl b/src/Compat.jl index c86e2e021..6877d44ac 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -22,12 +22,6 @@ end include("compatmacro.jl") -if VERSION < v"0.7.0-DEV.1053" - Base.read(obj::IO, ::Type{String}) = readstring(obj) - Base.read(obj::AbstractString, ::Type{String}) = readstring(obj) - Base.read(obj::Base.AbstractCmd, ::Type{String}) = readstring(obj) -end - # https://github.com/JuliaLang/julia/pull/20005 if VERSION < v"0.7.0-DEV.896" Base.InexactError(name::Symbol, T, val) = InexactError() diff --git a/test/old.jl b/test/old.jl index 31b8e3c8e..f9e6f2541 100644 --- a/test/old.jl +++ b/test/old.jl @@ -204,3 +204,11 @@ struct TestType end @test fieldcount(TestType) == 2 @test fieldcount(Int) == 0 + +# 0.7 +@test read(IOBuffer("aaaa"), String) == "aaaa" +@test occursin("read(@__FILE__, String)", read(@__FILE__, String)) +let cmd = `$(Base.julia_cmd()) --startup-file=no -e "println(:aaaa)"` + @test read(cmd, String) == "aaaa\n" + @test read(pipeline(cmd, stderr=devnull), String) == "aaaa\n" +end diff --git a/test/runtests.jl b/test/runtests.jl index 4d60ddc0d..44792cba6 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -110,14 +110,6 @@ let @test vec([b for (a,b) in pairs(IndexCartesian(), A14)]) == [11,12,13,14] end -# 0.7 -@test read(IOBuffer("aaaa"), String) == "aaaa" -@test occursin("read(@__FILE__, String)", read(@__FILE__, String)) -let cmd = `$(Base.julia_cmd()) --startup-file=no -e "println(:aaaa)"` - @test read(cmd, String) == "aaaa\n" - @test read(pipeline(cmd, stderr=devnull), String) == "aaaa\n" -end - # 0.7 @test isa(1:2, AbstractRange)