sparklemotion / nokogiri

Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
https://nokogiri.org/
MIT License
6.13k stars 897 forks source link

JRuby regressions 1.4.6 -> 1.5.0 #514

Closed wvanbergen closed 12 years ago

wvanbergen commented 13 years ago

Nokogiri 1.5.0 on JRuby seems to have some regressions:

The travis CI build: http://travis-ci.org/#!/wvanbergen/adyen/builds/75767 All tests run fine when not using JRuby or when using Nokogiri 1.4.6.

gstark commented 12 years ago

This code below produces a "called decorate on nill" exception in JRuby for me. Works fine in 1.4.6:


process_output= <<END
<test>
 <track type="Image">
 <Format>LZ77</Format>
</test>
END

doc = Nokogiri::XML.parse(process_output)

node = doc.xpath(%{//track[@type='Video']})

puts node.xpath("Format").inspect
yokolet commented 12 years ago

I'm very sorry to get back to you so late.

@wvanbergen current pure Java version returns exactly the same result as libxml version for Nokogiri::XML::Document.parse('< test />').to_s . So, it looks the bug has been fixed along with other bug fix(es), at some point.

However, "called decorate on nil" exception still exists there. So, I fixed this bug in rev. 0b8bf4e .

Thanks, @gstark . Your code was very helpful to figure out what caused the bug.