nokogiri 1.11.5-java → 1.11.6-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 359540eb42f3e46da5a14557c11873e1e4b6ddc82d472fe26f96f29ebe007be4
4
- data.tar.gz: 2ca21fc10cc5e1063a0584e62359467c4875f133821b8377f92f23d183784033
3
+ metadata.gz: d7566c9ba7c4bfc525562b8f80e7da42f28780dd7ffa7fb2904e2cea4c6c5d7d
4
+ data.tar.gz: 570824e9e3a95884c947544fd59205a916f580f8c4ecfd36e92ceebe7b84e3af
5
5
  SHA512:
6
- metadata.gz: 963b43a88afafb2d62023afed3269bf8b90ccfca08cb38b77b56bf9d6dc309de68c7310750817b0075690b44639535d0eafb4d480c463d1ecf58de22a62f4fcc
7
- data.tar.gz: 170bcbdf0d6f12ad359e3aaf56fab9a06a5ef59a0ed165dc12b5d0faeee65f3df68f7ca640c264f698308172950182c894bb957fef0e548f8e2f713127e0a72b
6
+ metadata.gz: c2dfd6bec1a38767f3aa2ed4ef45d110d32e72f357a8ff2b6c1cde04b6300f30d136a81b67d429b2991aed4c5687e341577ea3e76be625addaabf68cabdfcdfa
7
+ data.tar.gz: 618f739f628a5df78c18415ecb0f1fee22b4aa0c5292b349eb7e5e561bd0929b863b5b937c21e4f724b050d54942f469d584374b5a0e0b5c5eda4908bb8413f9
@@ -1292,17 +1292,25 @@ get_name(VALUE self)
1292
1292
  * Returns the path associated with this Node
1293
1293
  */
1294
1294
  static VALUE
1295
- path(VALUE self)
1295
+ noko_xml_node_path(VALUE rb_node)
1296
1296
  {
1297
- xmlNodePtr node;
1298
- xmlChar *path ;
1297
+ xmlNodePtr c_node;
1298
+ xmlChar *c_path ;
1299
1299
  VALUE rval;
1300
1300
 
1301
- Data_Get_Struct(self, xmlNode, node);
1301
+ Data_Get_Struct(rb_node, xmlNode, c_node);
1302
+
1303
+ c_path = xmlGetNodePath(c_node);
1304
+ if (c_path == NULL) {
1305
+ // see https://github.com/sparklemotion/nokogiri/issues/2250
1306
+ // this behavior is clearly undesirable, but is what libxml <= 2.9.10 returned, and so we
1307
+ // do this for now to preserve the behavior across libxml2 versions.
1308
+ rval = NOKOGIRI_STR_NEW2("?");
1309
+ } else {
1310
+ rval = NOKOGIRI_STR_NEW2(c_path);
1311
+ xmlFree(c_path);
1312
+ }
1302
1313
 
1303
- path = xmlGetNodePath(node);
1304
- rval = NOKOGIRI_STR_NEW2(path);
1305
- xmlFree(path);
1306
1314
  return rval ;
1307
1315
  }
1308
1316
 
@@ -1779,7 +1787,7 @@ noko_init_xml_node()
1779
1787
  rb_define_method(cNokogiriXmlNode, "next_element", next_element, 0);
1780
1788
  rb_define_method(cNokogiriXmlNode, "previous_element", previous_element, 0);
1781
1789
  rb_define_method(cNokogiriXmlNode, "node_type", node_type, 0);
1782
- rb_define_method(cNokogiriXmlNode, "path", path, 0);
1790
+ rb_define_method(cNokogiriXmlNode, "path", noko_xml_node_path, 0);
1783
1791
  rb_define_method(cNokogiriXmlNode, "key?", key_eh, 1);
1784
1792
  rb_define_method(cNokogiriXmlNode, "namespaced_key?", namespaced_key_eh, 2);
1785
1793
  rb_define_method(cNokogiriXmlNode, "blank?", blank_eh, 0);
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Nokogiri
3
3
  # The version of Nokogiri you are using
4
- VERSION = "1.11.5"
4
+ VERSION = "1.11.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.5
4
+ version: 1.11.6
5
5
  platform: java
6
6
  authors:
7
7
  - Mike Dalessio
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
- date: 2021-05-20 00:00:00.000000000 Z
20
+ date: 2021-05-26 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  requirement: !ruby/object:Gem::Requirement