Skip to content

Commit

Permalink
compatibility with julia v0.5 through v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Dec 19, 2017
1 parent 5c49e40 commit eb13c31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/PATHSolver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ function remove_option_file()
end
end

# Needed for compatibility with Julia v0.5 through v0.7
@static if VERSION < v"0.7.0-"
pairs(x) = [(p[1] => p[2]) for p in x]
end

function options(;kwargs...)
opt_file = open("path.opt", "w")
println(opt_file, "* Generated by PATHSolver.jl. Do not edit.")
for (key, value) in kwargs
for (key, value) in pairs(kwargs)
println(opt_file, key, " ", value)
end
close(opt_file)
Expand Down

0 comments on commit eb13c31

Please sign in to comment.