Skip to content

Commit b1fb6ab

Browse files
committed
Fix failure on 1.0 by adding Compat dependency
1 parent f008453 commit b1fb6ab

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
julia 0.6
2+
Compat 0.47

src/NaNMath.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
__precompile__()
22
module NaNMath
33

4+
using Compat
5+
46
const libm = Base.libm_name
57

68
for f in (:sin, :cos, :tan, :asin, :acos, :acosh, :atanh, :log, :log2, :log10,
@@ -57,7 +59,7 @@ function sum(x::AbstractArray{T}) where T<:AbstractFloat
5759
end
5860

5961
if isnan(result)
60-
Base.warn_once("All elements of the array, passed to \"sum\" are NaN!")
62+
Compat.@warn "All elements of the array, passed to \"sum\" are NaN!"
6163
end
6264
return result
6365
end

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using NaNMath
2-
using Base.Test
2+
using Compat.Test
33

44
@test isnan(NaNMath.log(-10))
55
@test isnan(NaNMath.log1p(-100))

0 commit comments

Comments
 (0)