Skip to content

Commit 1cb368d

Browse files
committed
Fix error on 0.6
1 parent 07fc018 commit 1cb368d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/query.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,10 @@ Base.read(s::Stream) = read(stream(s))
308308
Base.read(s::Stream, nb) = read(stream(s), nb)
309309
Base.flush(s::Stream) = flush(stream(s))
310310
# 0.4 compat
311-
Base.readbytes(s::Stream) = read(stream(s))
312-
Base.readbytes(s::Stream, nb) = read(stream(s), nb)
311+
if isdefined(Base, :readbytes)
312+
Base.readbytes(s::Stream) = read(stream(s))
313+
Base.readbytes(s::Stream, nb) = read(stream(s), nb)
314+
end
313315

314316
Base.isreadonly(s::Stream) = isreadonly(stream(s))
315317
Base.isopen(s::Stream) = isopen(stream(s))

0 commit comments

Comments
 (0)