Skip to content

Commit a8e8b85

Browse files
committed
Merge pull request #29 from JuliaLang/tk/0.4fix
fix for collect(::Dict) returning array of `Pair`s on 0.4
2 parents e1a059e + 3af1d7f commit a8e8b85

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/nodes.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,13 @@ end
326326

327327
set_attribute(x::XMLElement, name::String, val) = set_attribute(x, name, string(val))
328328

329-
function set_attributes{P<:NTuple{2}}(x::XMLElement, attrs::AbstractArray{P})
329+
if VERSION < v"0.4.0-dev+980"
330+
PairTypes = NTuple{2}
331+
else
332+
PairTypes = Union(NTuple{2}, Pair)
333+
end
334+
335+
function set_attributes{P<:PairTypes}(x::XMLElement, attrs::AbstractArray{P})
330336
for (nam, val) in attrs
331337
set_attribute(x, string(nam), string(val))
332338
end

0 commit comments

Comments
 (0)