Skip to content

Commit

Permalink
change parse to parse_readable to protect other uses of parse
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySarnoff authored Jan 5, 2017
1 parent fc2a68d commit db6101d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/support/iohelp.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Base: STDOUT


# show

function show_readable{T<:Real}(io::IO, x::T)
Expand All @@ -16,8 +13,8 @@ end

# parse readable numeric strings

parse{T<:Union{Signed,AbstractFloat}}(::Type{T}, s::String, ch::Char) =
parse(T, join(split(s,ch),""))
parse_readeable{T<:Union{Signed,AbstractFloat}}(::Type{T}, s::String, ch::Char) =
Base.parse(T, join(split(s,ch),""))

parse{T<:AbstractFloat}(::Type{T}, s::String, ch1::Char, ch2::Char) =
parse(T, join(split(s,(ch1,ch2)),""))
parse_readable{T<:AbstractFloat}(::Type{T}, s::String, ch1::Char, ch2::Char) =
Base.parse(T, join(split(s,(ch1,ch2)),""))

0 comments on commit db6101d

Please sign in to comment.