Skip to content

Commit

Permalink
moved repr from io.jl to string.jl
Browse files Browse the repository at this point in the history
as it is used in pcre.jl
  • Loading branch information
tanmaykm authored and vtjnash committed Jul 12, 2013
1 parent fd7e27d commit 686f925
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions base/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,6 @@ end

sprint(f::Function, args...) = sprint(0, f, args...)

function repr(x)
s = IOBuffer()
show(s, x)
takebuf_string(s)
end

write(x) = write(STDOUT::IO, x)

function readuntil(s::IOStream, delim::Uint8)
Expand Down
6 changes: 6 additions & 0 deletions base/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1378,3 +1378,9 @@ end

bytes2hex(arr::Array{Uint8,1}) = join([hex(i, 2) for i in arr])

function repr(x)
s = IOBuffer()
show(s, x)
takebuf_string(s)
end

0 comments on commit 686f925

Please sign in to comment.