Skip to content

Commit 2cb376c

Browse files
tlnagyKristofferC
authored andcommitted
check if Julia version is post-combinatorics removal (#27)
fixes #26
1 parent 44d815f commit 2cb376c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Combinatorics.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import Base: start, next, done, length, eltype
88

99
#These 8 functions were removed from Julia 0.5 as part of JuliaLang/julia#13897,
1010
#so check if it's necessary to import them to overload the stub methods left in
11-
#Base.
12-
if isdefined(Base, :combinations)
11+
#Base. Only do this if on a version of Julia post-combinatorics removal.
12+
if isdefined(Base, :combinations) && VERSION >= v"0.5.0-dev+1204"
1313
import Base: combinations, partitions, prevprod, levicivita, nthperm,
1414
nthperm!, parity, permutations
1515
end

0 commit comments

Comments
 (0)