Skip to content

Commit

Permalink
Fix #4021
Browse files Browse the repository at this point in the history
  • Loading branch information
kmsquire committed Aug 12, 2013
1 parent 5fba85e commit 66734e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ show(io::IO, ::Nothing) = print(io, "nothing")
show(io::IO, b::Bool) = print(io, b ? "true" : "false")
show(io::IO, n::Signed) = (write(io, dec(n)); nothing)
show(io::IO, n::Unsigned) = print(io, "0x", hex(n,sizeof(n)<<1))
print(io::IO, n::Integer) = print(io, dec(n))
print(io::IO, n::Unsigned) = print(io, dec(n))

show{T}(io::IO, p::Ptr{T}) =
print(io, is(T,None) ? "Ptr{Void}" : typeof(p), " @0x$(hex(unsigned(p), WORD_SIZE>>2))")
Expand Down
6 changes: 6 additions & 0 deletions test/iostring.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ write(io,'e')
skip(io,72)
@assert takebuf_string(io) == "\0ab"
@assert takebuf_string(io) == ""

# issues 4021
print(io, true)

close(io)
end

@test isempty(readlines(IOBuffer()))


0 comments on commit 66734e6

Please sign in to comment.