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 unable to parse RubyZip's streams in JRuby #1124

Closed
weshatheleopard opened this issue Jun 30, 2014 · 2 comments
Closed

(JRuby) Nokogiri unable to parse RubyZip's streams in JRuby #1124

weshatheleopard opened this issue Jun 30, 2014 · 2 comments
Assignees
Milestone

Comments

@weshatheleopard
Copy link

When s.is_a?(Zip::InputStream), Nokogiri::XML.parse(s) works fine on all platforms, except for JRuby, where it fails:

ArgumentError: must be kind_of String or respond to :to_io or :string
           read_io at nokogiri/XmlDocument.java:337
             parse at /home/hk/.rvm/gems/jruby-1.7.13@rubyxl-demo/gems/nokogiri-1.6.3.rc3-java/lib/nokogiri/xml/document.rb:52
[...]

For original report by @heisee, see weshatheleopard/rubyXL#124

@weshatheleopard weshatheleopard changed the title Nokogiri unable to handle RubyZip's streams in JRuby Nokogiri unable to parse RubyZip's streams in JRuby Jun 30, 2014
@weshatheleopard weshatheleopard changed the title Nokogiri unable to parse RubyZip's streams in JRuby (JRuby) Nokogiri unable to parse RubyZip's streams in JRuby Jul 1, 2014
jjb added a commit to jjb/dullard that referenced this issue Aug 13, 2014
@flavorjones flavorjones self-assigned this Feb 5, 2015
flavorjones added a commit that referenced this issue Feb 6, 2015
JRuby should handle parsing an object that responds to #read.

Signed-off-by: Jake Byman <[email protected]>
@flavorjones
Copy link
Member

Will be in the next Nokogiri release, likely 1.6.7.

@flavorjones flavorjones added this to the 1.6.7 milestone Feb 6, 2015
@heisee
Copy link

heisee commented Feb 6, 2015

Ah, very good, thank you all!

flavorjones added a commit that referenced this issue Apr 7, 2019
because implementing read like this can result in nondeterministic
behavior. see related #1821 and #1888.
flavorjones added a commit that referenced this issue Apr 7, 2019
related to incomplete application of fix from #1124
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

4 participants