Test for fragment node before assuming a node doc pointer is a doc. #678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The doc pointer on an xmlNode is not always an xmlDoc. The child of a document
fragment will point to the document fragment, which does not behave exactly
like an xmlDoc and doesn't have a nokogiriTuple.
This changeset tests for XML_DOCUMENT_FRAG_NODE before assuming that the doc
pointer is an xmlDoc.
This changes the NOKOGIRI_ROOT_NODE and NOKOGIRI_ROOT_NSDEF macros to functions
which test for this case.
Also check for this case in Nokogiri_wrap_xml_node.
This changeset adds a unit test which was copied from Kristi's bug report, #677
Reported-by: Kristi [email protected]