-
-
Notifications
You must be signed in to change notification settings - Fork 898
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
"null document" error when parsing an empty IO in jruby 1.7.3 #883
Comments
I'm looking at https://github.com/sparklemotion/nokogiri/blob/master/lib/nokogiri/xml/document.rb#L52-L53 and wondering if there ought to be a similar code like: |
Apparently it's not just read_memory that pukes on empty docs; it's Xerces, too. I can't imagine any harm from moving line 53 to before line 48 and skipping the whole block if the source IO is empty, but I don't have the cycles to try it out right now. |
@jcoyne You're probably right. Send a pull request? |
Jruby 1.7.3
In Ruby 2.0.0:
The text was updated successfully, but these errors were encountered: