Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby: Nokogiri::XML::XPath::SyntaxError when querying with pseudoclass #1470

Closed
mattparlane opened this issue May 20, 2016 · 2 comments
Closed

Comments

@mattparlane
Copy link

This is with JRuby 9.1.1.0, and Nokogiri 1.6.7.2:

require 'nokogiri'
p Nokogiri.XML('<foo></foo>').css('a:hover img')

MRI:

# /usr/local/bin/ruby.mri test.rb
[]

JRuby:

# ruby test.rb
Nokogiri::XML::XPath::SyntaxError: //a[hover(.)]//img
        evaluate at nokogiri/XmlXpathContext.java:169
  block in xpath at /root/jruby-9.1.1.0/lib/ruby/gems/shared/gems/nokogiri-1.6.7.2-java/lib/nokogiri/xml/searchable.rb:165
             map at org/jruby/RubyArray.java:2355
           xpath at /root/jruby-9.1.1.0/lib/ruby/gems/shared/gems/nokogiri-1.6.7.2-java/lib/nokogiri/xml/searchable.rb:156
    css_internal at /root/jruby-9.1.1.0/lib/ruby/gems/shared/gems/nokogiri-1.6.7.2-java/lib/nokogiri/xml/searchable.rb:193
             css at /root/jruby-9.1.1.0/lib/ruby/gems/shared/gems/nokogiri-1.6.7.2-java/lib/nokogiri/xml/searchable.rb:107
     <top> at test.rb:2
@flavorjones
Copy link
Member

Hi, thanks for submitting this bug report. Certainly we should make both MRI and JRuby implementations behave the same.

@flavorjones
Copy link
Member

This is fixed in v1.15.0, likely because of the work in #2867 and specifically this commit: 892b2c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants