nokogiri 1.13.6 → 1.13.9

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.

@@ -371,9 +371,12 @@ new (VALUE klass, VALUE nodeobj)
371
371
  xmlXPathContextPtr ctx;
372
372
  VALUE self;
373
373
 
374
- Data_Get_Struct(nodeobj, xmlNode, node);
374
+ Noko_Node_Get_Struct(nodeobj, xmlNode, node);
375
375
 
376
+ #if LIBXML_VERSION < 21000
377
+ /* deprecated in 40483d0 */
376
378
  xmlXPathInit();
379
+ #endif
377
380
 
378
381
  ctx = xmlXPathNewContext(node->doc);
379
382
  ctx->node = node;
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nokogiri
4
4
  # The version of Nokogiri you are using
5
- VERSION = "1.13.6"
5
+ VERSION = "1.13.9"
6
6
  end
@@ -83,16 +83,14 @@ module Nokogiri
83
83
  end
84
84
  private :initialize
85
85
 
86
- # Get the attributes of the current node as a Hash
86
+ # Get the attributes and namespaces of the current node as a Hash.
87
87
  #
88
- # [Returns] (Hash<String, String>) Attribute names and values
88
+ # This is the union of Reader#attribute_hash and Reader#namespaces
89
+ #
90
+ # [Returns]
91
+ # (Hash<String, String>) Attribute names and values, and namespace prefixes and hrefs.
89
92
  def attributes
90
- attrs_hash = attribute_nodes.each_with_object({}) do |node, hash|
91
- hash[node.name] = node.to_s
92
- end
93
- ns = namespaces
94
- attrs_hash.merge!(ns) if ns
95
- attrs_hash
93
+ attribute_hash.merge(namespaces)
96
94
  end
97
95
 
98
96
  ###
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.13.6
4
+ version: 1.13.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Dalessio
@@ -20,7 +20,7 @@ authors:
20
20
  autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
- date: 2022-05-08 00:00:00.000000000 Z
23
+ date: 2022-10-18 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mini_portile2
@@ -138,16 +138,16 @@ dependencies:
138
138
  name: rake-compiler-dock
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - "~>"
141
+ - - '='
142
142
  - !ruby/object:Gem::Version
143
- version: '1.2'
143
+ version: 1.2.2
144
144
  type: :development
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - "~>"
148
+ - - '='
149
149
  - !ruby/object:Gem::Version
150
- version: '1.2'
150
+ version: 1.2.2
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: rdoc
153
153
  requirement: !ruby/object:Gem::Requirement
@@ -182,20 +182,14 @@ dependencies:
182
182
  requirements:
183
183
  - - "~>"
184
184
  - !ruby/object:Gem::Version
185
- version: '1.28'
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- version: 1.28.2
185
+ version: 1.30.1
189
186
  type: :development
190
187
  prerelease: false
191
188
  version_requirements: !ruby/object:Gem::Requirement
192
189
  requirements:
193
190
  - - "~>"
194
191
  - !ruby/object:Gem::Version
195
- version: '1.28'
196
- - - ">="
197
- - !ruby/object:Gem::Version
198
- version: 1.28.2
192
+ version: 1.30.1
199
193
  - !ruby/object:Gem::Dependency
200
194
  name: rubocop-minitest
201
195
  requirement: !ruby/object:Gem::Requirement
@@ -242,16 +236,16 @@ dependencies:
242
236
  name: rubocop-shopify
243
237
  requirement: !ruby/object:Gem::Requirement
244
238
  requirements:
245
- - - "~>"
239
+ - - '='
246
240
  - !ruby/object:Gem::Version
247
- version: '2.3'
241
+ version: 2.5.0
248
242
  type: :development
249
243
  prerelease: false
250
244
  version_requirements: !ruby/object:Gem::Requirement
251
245
  requirements:
252
- - - "~>"
246
+ - - '='
253
247
  - !ruby/object:Gem::Version
254
- version: '2.3'
248
+ version: 2.5.0
255
249
  - !ruby/object:Gem::Dependency
256
250
  name: ruby_memcheck
257
251
  requirement: !ruby/object:Gem::Requirement
@@ -493,14 +487,11 @@ files:
493
487
  - patches/libxml2/0001-Remove-script-macro-support.patch
494
488
  - patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch
495
489
  - patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch
496
- - patches/libxml2/0004-use-glibc-strlen.patch
497
490
  - patches/libxml2/0005-avoid-isnan-isinf.patch
498
- - patches/libxml2/0006-update-automake-files-for-arm64.patch
499
- - patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch
500
491
  - patches/libxml2/0009-allow-wildcard-namespaces.patch
501
492
  - patches/libxslt/0001-update-automake-files-for-arm64.patch
502
- - ports/archives/libxml2-2.9.14.tar.xz
503
- - ports/archives/libxslt-1.1.35.tar.xz
493
+ - ports/archives/libxml2-2.10.3.tar.xz
494
+ - ports/archives/libxslt-1.1.37.tar.xz
504
495
  homepage: https://nokogiri.org
505
496
  licenses:
506
497
  - MIT
@@ -528,7 +519,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
528
519
  - !ruby/object:Gem::Version
529
520
  version: '0'
530
521
  requirements: []
531
- rubygems_version: 3.3.5
522
+ rubygems_version: 3.3.7
532
523
  signing_key:
533
524
  specification_version: 4
534
525
  summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
@@ -1,53 +0,0 @@
1
- From c94172d2a4451368530db2186190d70be8a1d9e5 Mon Sep 17 00:00:00 2001
2
- From: Ilya Zub <ilya@serpapi.com>
3
- Date: Wed, 23 Dec 2020 12:45:29 +0200
4
- Subject: Use glibc strlen to speed up xmlStrlen
5
- MIME-Version: 1.0
6
- Content-Type: text/plain; charset=UTF-8
7
- Content-Transfer-Encoding: 8bit
8
-
9
- xmlStrlen (entire HTML file): 926171.936981 μs
10
- glibc_xmlStrlen (entire HTML file): 36905.903992 μs
11
- delta (xmlStrlen ÷ glibc_xmlStrlen): 25.094584 times
12
-
13
- xmlStrlen (average string): 57479.204010 μs
14
- glibc_xmlStrlen (average string): 5802.069000 μs
15
- delta (xmlStrlen ÷ glibc_xmlStrlen): 9.905937 times
16
-
17
- xmlStrlen (bigger string): 388056.315979 μs
18
- glibc_xmlStrlen (bigger string): 12797.856995 μs
19
- delta (xmlStrlen ÷ glibc_xmlStrlen): 30.318382 times
20
-
21
- xmlStrlen (smallest string): 15870.046021 μs
22
- glibc_xmlStrlen (smallest string): 6282.208984 μs
23
- delta (xmlStrlen ÷ glibc_xmlStrlen): 2.527903 times
24
-
25
- See https://gitlab.gnome.org/GNOME/libxml2/-/issues/212 for reference.
26
- ---
27
- xmlstring.c | 9 ++-------
28
- 1 file changed, 2 insertions(+), 7 deletions(-)
29
-
30
- diff --git a/xmlstring.c b/xmlstring.c
31
- index e8a1e45d..df247dff 100644
32
- --- a/xmlstring.c
33
- +++ b/xmlstring.c
34
- @@ -423,12 +423,7 @@ xmlStrsub(const xmlChar *str, int start, int len) {
35
-
36
- int
37
- xmlStrlen(const xmlChar *str) {
38
- - size_t len = 0;
39
- -
40
- if (str == NULL) return(0);
41
- - while (*str != 0) { /* non input consuming */
42
- - str++;
43
- - len++;
44
- - }
45
- - return(len > INT_MAX ? 0 : len);
46
- +
47
- + return strlen((const char*)str);
48
- }
49
-
50
- /**
51
- --
52
- 2.29.2
53
-