Skip to content

Commit

Permalink
Merge pull request #22 from simonbyrne/itrunc
Browse files Browse the repository at this point in the history
itrunc/iceil/ifloor(Int,x::Integer) not defined in 0.3
  • Loading branch information
timholy committed Dec 1, 2014
2 parents 5a3950a + f972535 commit 55dac99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Base: round, ceil, floor, trunc
if VERSION < v"0.4.0-dev+1827"
for (fnew,fold) in ((:round, :iround), (:ceil, :iceil), (:floor, :ifloor), (:trunc, :itrunc))
@eval begin
($fnew){T<:Integer}(::Type{T}, x::Integer) = ($fold)(T, x) # ambiguity resolution with digits/base version
($fnew){T<:Integer}(::Type{T}, x::Integer) = convert(T, x) # ambiguity resolution with digits/base version, not all old methods defined
($fnew){T<:Integer}(::Type{T}, x) = ($fold)(T, x)
end
end
Expand Down

0 comments on commit 55dac99

Please sign in to comment.