Skip to content

Commit 21a3028

Browse files
committed
Drop compat code for read(obj, ::Type{String}) from #385 and #580
1 parent f791e94 commit 21a3028

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ Currently, the `@compat` macro supports the following syntaxes:
222222

223223
* `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]).
224224

225-
* `readstring` is replaced by methods of `read`. ([#22864])
226-
227-
`read(::IO, ::Type{String})`, `read(::AbstractString, ::Type{String})`,
228-
and `read(::AbstractCmd, ::Type{String})` are defined for 0.6 and below.
229-
230225
* `Range` is now `AbstractRange` ([#23570])
231226

232227
* `select`* functions (`select`, `select!`, `selectperm`, `selectperm!`) are renamed to

src/Compat.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ end
2222

2323
include("compatmacro.jl")
2424

25-
if VERSION < v"0.7.0-DEV.1053"
26-
Base.read(obj::IO, ::Type{String}) = readstring(obj)
27-
Base.read(obj::AbstractString, ::Type{String}) = readstring(obj)
28-
Base.read(obj::Base.AbstractCmd, ::Type{String}) = readstring(obj)
29-
end
30-
3125
# https://github.com/JuliaLang/julia/pull/20005
3226
if VERSION < v"0.7.0-DEV.896"
3327
Base.InexactError(name::Symbol, T, val) = InexactError()

test/old.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,11 @@ struct TestType
204204
end
205205
@test fieldcount(TestType) == 2
206206
@test fieldcount(Int) == 0
207+
208+
# 0.7
209+
@test read(IOBuffer("aaaa"), String) == "aaaa"
210+
@test occursin("read(@__FILE__, String)", read(@__FILE__, String))
211+
let cmd = `$(Base.julia_cmd()) --startup-file=no -e "println(:aaaa)"`
212+
@test read(cmd, String) == "aaaa\n"
213+
@test read(pipeline(cmd, stderr=devnull), String) == "aaaa\n"
214+
end

test/runtests.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@ let
110110
@test vec([b for (a,b) in pairs(IndexCartesian(), A14)]) == [11,12,13,14]
111111
end
112112

113-
# 0.7
114-
@test read(IOBuffer("aaaa"), String) == "aaaa"
115-
@test occursin("read(@__FILE__, String)", read(@__FILE__, String))
116-
let cmd = `$(Base.julia_cmd()) --startup-file=no -e "println(:aaaa)"`
117-
@test read(cmd, String) == "aaaa\n"
118-
@test read(pipeline(cmd, stderr=devnull), String) == "aaaa\n"
119-
end
120-
121113
# 0.7
122114
@test isa(1:2, AbstractRange)
123115

0 commit comments

Comments
 (0)