You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found this relatively obscure bug when using equivalent-xml with jruby, which I think is a bug in nokogiri:
when comparing to xml documents where one of them starts with a string before the xml preamble, nokogiri ignores the following elements in the document.
Although I assume that this is a bug in nokogiri, I published two test cases, to my fork of the repository, showing off the odd behaviour because I think this should be a know issue.
# this passes on jrubyit"should ignore leading whitespace #1"dodoc1=Nokogiri::XML("<bar><foo /></bar>")doc2=Nokogiri::XML(" <bar><foo /></bar>")doc1.shouldbe_equivalent_to(doc2)end# this fails on jrubyit"should ignore leading whitespace #2"dodoc1=Nokogiri::XML("<?xml version='1.0' encoding='utf-8' ?><foo />")doc2=Nokogiri::XML(" <?xml version='1.0' encoding='utf-8' ?><foo />")doc1.shouldbe_equivalent_to(doc2)end
I found this relatively obscure bug when using
equivalent-xml
withjruby
, which I think is a bug innokogiri
:when comparing to xml documents where one of them starts with a string before the xml preamble, nokogiri ignores the following elements in the document.
this works perfectly fine in ruby 1.8, 1.9, rbx1.8 and rbx1.9:
weird however is, that this works as originally expected with all ruby implementations when the first element is not the xml preamble:
Although I assume that this is a bug in
nokogiri
, I published two test cases, to my fork of the repository, showing off the odd behaviour because I think this should be a know issue.the complete output is visible on travis ci
The text was updated successfully, but these errors were encountered: