You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/java/nokogiri/XmlText.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -51,14 +51,14 @@ public class XmlText extends XmlNode
51
51
}
52
52
53
53
content = args[0];
54
-
IRubyObjectxNode = args[1];
54
+
IRubyObjectrbDocument = args[1];
55
55
56
-
if (!(xNodeinstanceofXmlDocument)) {
56
+
if (!(rbDocumentinstanceofXmlDocument)) {
57
57
// TODO: deprecate allowing Node
58
58
context.runtime.getWarnings().warn("Passing a Node as the second parameter to Text.new is deprecated. Please pass a Document instead. This will become an error in a future release of Nokogiri.");
if (rb_obj_is_kind_of(document, cNokogiriXmlDocument)) {
24
-
doc=noko_xml_document_unwrap(document);
25
-
} else {
23
+
if (!rb_obj_is_kind_of(rb_document, cNokogiriXmlDocument)) {
26
24
xmlNodePtrdeprecated_node_type_arg;
27
25
// TODO: deprecate allowing Node
28
26
NOKO_WARN_DEPRECATION("Passing a Node as the second parameter to Text.new is deprecated. Please pass a Document instead. This will become an error in a future release of Nokogiri.");
0 commit comments