Created
August 17, 2012 16:57
-
-
Save statonjr/3380575 to your computer and use it in GitHub Desktop.
Nokogiri Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby 1.9.3-p194 | |
[2] pry(main)> xslt = Nokogiri::XSLT(File.read('features/support/test_data/test.xslt')) | |
=> #<Nokogiri::XSLT::Stylesheet:0x007f841a850228> | |
# JRuby 1.6.7.2 in 1.9 mode | |
[2] pry(main)> xslt = Nokogiri::XSLT(File.read('features/support/test_data/test.xslt')) | |
=> #<Nokogiri::XSLT::Stylesheet:0x00000000> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="order"> | |
<xsl:value-of select="items"/> | |
</xsl:template> | |
</xsl:stylesheet> |
This is a bug in the PP library on jruby:
[34] pry(main)> p xslt;
#<Nokogiri::XSLT::Stylesheet:0x5cf64dcd>
[35] pry(main)> pp xslt;
#<Nokogiri::XSLT::Stylesheet:0x00000000>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks JRuby + pry combination problem.
while
From this result, pure Java Nokogiri looks working correctly. I'm suspecting pry's JRuby support, or some method pry uses doesn't work on JRuby correctly.
Do you know what part of pry releated to the wrong result?