Skip to content

Commit b78b405

Browse files
committed
FemtoCleaner deprecation fixes for julia 0.7
1 parent bb5b019 commit b78b405

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ ERROR: InexactError()
2020
julia> RInt(7.2) # but not with a rounding integer
2121
7
2222

23-
julia> (map(RInt, 1.5:1:4.5)...) # rounds half integers to nearest even
23+
julia> (map(RInt, 1.5:1:4.5)...,) # rounds half integers to nearest even
2424
(2, 2, 4, 4)
2525

26-
julia> a = Vector{RUInt8}(2)
26+
julia> a = Vector{RUInt8}(undef, 2)
2727
2-element Array{RoundingIntegers.RUInt8,1}:
2828
0x42
2929
0x61

src/RoundingIntegers.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
__precompile__(true)
2-
31
module RoundingIntegers
42

53
using Compat
@@ -98,7 +96,7 @@ RInteger(x::Unsigned) = RUnsigned(x)
9896
RInteger(convert(itype(T), Integer(x)))
9997
@inline Base.convert(::Type{T}, x::Integer) where {T<:RInteger} = RInteger(convert(itype(T), x))
10098
@inline Base.convert(::Type{T}, x::AbstractFloat) where {T<:RInteger} =
101-
RInteger(round(itype(T), x))
99+
RInteger(round(itype(T), digits=x))
102100
@inline Base.convert(::Type{T}, x::Number) where {T<:RInteger} =
103101
convert(T, convert(itype(T), x))
104102

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Compat, Base.Test
1+
using Compat, Test
22
ambs0 = detect_ambiguities(Base, Core, Compat)
33
using RoundingIntegers
44
ambs1 = detect_ambiguities(Base, Core, Compat, RoundingIntegers)

0 commit comments

Comments
 (0)