nokogiri 1.13.5-x64-mingw32 → 1.13.6-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/nokogiri/html4_sax_parser_context.c +2 -3
- data/ext/nokogiri/xml_sax_parser_context.c +10 -3
- data/lib/nokogiri/2.6/nokogiri.so +0 -0
- data/lib/nokogiri/2.7/nokogiri.so +0 -0
- data/lib/nokogiri/3.0/nokogiri.so +0 -0
- data/lib/nokogiri/html4/sax/parser.rb +1 -1
- data/lib/nokogiri/version/constant.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23d7c97fdd4a14a3d60b453edc9571deb5d2000ae192665a75feb1d3b84ec0d5
|
4
|
+
data.tar.gz: 1f948afed030d4567a9cef18f8269f59b257c0e80bb2f0c1fe4e3097d947269c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 307ace2921efa2ea35433b66713a55acfacffb79449a7baa862e66960c979b82316d4a7ba92aa27f0ca88d2a3f2b8dab47c46083da973e2350a6cea867074547
|
7
|
+
data.tar.gz: 537e8f0baf83b905fab09eb6400f5d4018c379ddd63e8d53dc368dcd9e3889698324821ada147115b4da7e98b2f103123138571220d26704f7cceba8d8aa7594
|
@@ -19,9 +19,8 @@ parse_memory(VALUE klass, VALUE data, VALUE encoding)
|
|
19
19
|
{
|
20
20
|
htmlParserCtxtPtr ctxt;
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
}
|
22
|
+
Check_Type(data, T_STRING);
|
23
|
+
|
25
24
|
if (!(int)RSTRING_LEN(data)) {
|
26
25
|
rb_raise(rb_eRuntimeError, "data cannot be empty");
|
27
26
|
}
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
VALUE cNokogiriXmlSaxParserContext ;
|
4
4
|
|
5
|
+
static ID id_read;
|
6
|
+
|
5
7
|
static void
|
6
8
|
deallocate(xmlParserCtxtPtr ctxt)
|
7
9
|
{
|
@@ -26,6 +28,10 @@ parse_io(VALUE klass, VALUE io, VALUE encoding)
|
|
26
28
|
xmlParserCtxtPtr ctxt;
|
27
29
|
xmlCharEncoding enc = (xmlCharEncoding)NUM2INT(encoding);
|
28
30
|
|
31
|
+
if (!rb_respond_to(io, id_read)) {
|
32
|
+
rb_raise(rb_eTypeError, "argument expected to respond to :read");
|
33
|
+
}
|
34
|
+
|
29
35
|
ctxt = xmlCreateIOParserCtxt(NULL, NULL,
|
30
36
|
(xmlInputReadCallback)noko_io_read,
|
31
37
|
(xmlInputCloseCallback)noko_io_close,
|
@@ -62,9 +68,8 @@ parse_memory(VALUE klass, VALUE data)
|
|
62
68
|
{
|
63
69
|
xmlParserCtxtPtr ctxt;
|
64
70
|
|
65
|
-
|
66
|
-
|
67
|
-
}
|
71
|
+
Check_Type(data, T_STRING);
|
72
|
+
|
68
73
|
if (!(int)RSTRING_LEN(data)) {
|
69
74
|
rb_raise(rb_eRuntimeError, "data cannot be empty");
|
70
75
|
}
|
@@ -278,4 +283,6 @@ noko_init_xml_sax_parser_context()
|
|
278
283
|
rb_define_method(cNokogiriXmlSaxParserContext, "recovery", get_recovery, 0);
|
279
284
|
rb_define_method(cNokogiriXmlSaxParserContext, "line", line, 0);
|
280
285
|
rb_define_method(cNokogiriXmlSaxParserContext, "column", column, 0);
|
286
|
+
|
287
|
+
id_read = rb_intern("read");
|
281
288
|
}
|
Binary file
|
Binary file
|
Binary file
|
@@ -28,7 +28,7 @@ module Nokogiri
|
|
28
28
|
###
|
29
29
|
# Parse html stored in +data+ using +encoding+
|
30
30
|
def parse_memory(data, encoding = "UTF-8")
|
31
|
-
raise
|
31
|
+
raise TypeError unless String === data
|
32
32
|
return if data.empty?
|
33
33
|
|
34
34
|
ctx = ParserContext.memory(data, encoding)
|
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.
|
4
|
+
version: 1.13.6
|
5
5
|
platform: x64-mingw32
|
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-
|
23
|
+
date: 2022-05-08 00:00:00.000000000 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: racc
|