Skip to content

Commit 4a7c36f

Browse files
committed
Fix compatibility issues with v0.4 ntuple
1 parent a05c7cc commit 4a7c36f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Options.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ function Options{T<:OptionsChecking}(::Type{T},args...)
3838
end
3939
n = div(length(args),2)
4040
keys, index, vals = if n > 0
41-
(args[1:2:end], ntuple(n, identity), Any[args[2:2:end]...])
41+
if VERSION < v"0.4-"
42+
(args[1:2:end], ntuple(n, identity), Any[args[2:2:end]...])
43+
else
44+
(args[1:2:end], ntuple(identity, n), Any[args[2:2:end]...])
45+
end
4246
else
4347
((), (), Array(Any, 0))
4448
end

0 commit comments

Comments
 (0)