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

Inconsistent parsing in CRuby vs JRuby #796

Closed
lephyrius opened this issue Nov 20, 2012 · 1 comment
Closed

Inconsistent parsing in CRuby vs JRuby #796

lephyrius opened this issue Nov 20, 2012 · 1 comment

Comments

@lephyrius
Copy link

I tested this is IRB:

1.9.3p286 :002 > require 'nokogiri'
 => true 
1.9.3p286 :003 > Nokogiri::HTML::DocumentFragment.parse("")
 => #<Nokogiri::HTML::DocumentFragment:0x80829828 name="#document-fragment"> 
1.9.3p286 :004 > Nokogiri::HTML::DocumentFragment.parse(" ")
 => #<Nokogiri::HTML::DocumentFragment:0x80434038 name="#document-fragment"> 
jruby-1.7.0 :001 > require 'nokogiri'
 => true 
jruby-1.7.0 :002 > Nokogiri::HTML::DocumentFragment.parse("")
 => #<Nokogiri::HTML::DocumentFragment:0x7fa name="#document-fragment"> 
jruby-1.7.0 :003 > Nokogiri::HTML::DocumentFragment.parse(" ")
 => #<Nokogiri::HTML::DocumentFragment:0x7fe name="#document-fragment" children=[#<Nokogiri::XML::Text:0x7fc " ">]> 

As you can see. JRuby got children.

Nokogiri (1.5.5)
    ---
    warnings: []
    nokogiri: 1.5.5
    ruby:
      version: 1.9.3
      platform: java
      description: jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.6.0_26-b03-384-10M3425 [darwin-x86_64]
      engine: jruby
      jruby: 1.7.0

@flavorjones
Copy link
Member

This appears to be a dupe of #847 (or that is a dupe of this). In any case, it's not clear to me what the real-world impact of this is, and so I'm closing.

I'm happy to reconsider if you'll help me understand what affect this behavior is having.

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