Skip to content

Commit

Permalink
XML: fix deprecation warning (#10335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian J. Cardiff authored Jan 30, 2021
1 parent 77f7f02 commit e260352
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions spec/std/xml/xpath_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,10 @@ module XML
result = doc.xpath_string("string(//feed/person[@id=$value]/@id)", variables: {"value" => 2})
result.should eq("2")
end

it "NodeSet#to_s" do
doc = doc()
doc.xpath("//people/person").to_s
end
end
end
2 changes: 1 addition & 1 deletion src/xml/node_set.cr
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct XML::NodeSet
end

def to_s(io : IO) : Nil
join '\n', io
join io, '\n'
end

def to_unsafe
Expand Down

0 comments on commit e260352

Please sign in to comment.