nokogiri 1.13.5-x86-mingw32 → 1.13.6-x86-mingw32

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: '0814125fce9396cffbfe5cfd5f71c4680c29f757d8eb224dece056821785e69e'
4
- data.tar.gz: f0e4a57b8bf2110137adb08f840d483c1ec140f2bc2e16167dcb10b9b4b75a65
3
+ metadata.gz: 88b83c7d72e0eb27edca3a77d1eafac936c0c065737793189c485e2393323383
4
+ data.tar.gz: 2745e7ae4c37d0774d860e15f6dfa3fa668fffc8095a564c51e4a8a2125d5f94
5
5
  SHA512:
6
- metadata.gz: 51bbe2b5600ca16412c3470dfc55be84ee470d22b5661d85c17975716b0dbc3247fea2f5b60472564e3dc1863729ddddd55a54315f9d52d289e65de895e9d6f4
7
- data.tar.gz: c576a4706da9924935b367f90f10497b32722f7918133af608220e69b72780f4ab958ac223b9dd3804f784236dcce8b194607789c23e9d3a82bfd633e72ddca6
6
+ metadata.gz: 25d707a89c6b025c58b2d2aa57f21bfe34235a86b288a1f32634a214a04a5821c6bd8583da2bfbd6baa6fa83ec5228c62da3a06f29c140a97981758ad6c5040d
7
+ data.tar.gz: 2515da9cdbc2b2d022fb153096ca137b890e4466209c42a58f51eda971eb253444dda7b0ee299811be0aa4aa7be85e9a21cdb72fe6544ad6b5ad6aaba0f2636a
@@ -19,9 +19,8 @@ parse_memory(VALUE klass, VALUE data, VALUE encoding)
19
19
  {
20
20
  htmlParserCtxtPtr ctxt;
21
21
 
22
- if (NIL_P(data)) {
23
- rb_raise(rb_eArgError, "data cannot be nil");
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
  }
@@ -133,7 +133,7 @@ extern "C" {
133
133
  #ifndef WITH_MODULES
134
134
  #define WITH_MODULES
135
135
  #endif
136
- #define LIBXSLT_DEFAULT_PLUGINS_PATH() "/home/flavorjones/code/oss/nokogiri/ports/x64-mingw32/libxslt/1.1.35/lib/libxslt-plugins"
136
+ #define LIBXSLT_DEFAULT_PLUGINS_PATH() "/home/flavorjones/code/oss/nokogiri/ports/x86-mingw32/libxslt/1.1.35/lib/libxslt-plugins"
137
137
  #endif
138
138
 
139
139
  /**
@@ -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
- if (NIL_P(data)) {
66
- rb_raise(rb_eArgError, "data cannot be nil");
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
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 ArgumentError unless data
31
+ raise TypeError unless String === data
32
32
  return if data.empty?
33
33
 
34
34
  ctx = ParserContext.memory(data, encoding)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nokogiri
4
4
  # The version of Nokogiri you are using
5
- VERSION = "1.13.5"
5
+ VERSION = "1.13.6"
6
6
  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.13.5
4
+ version: 1.13.6
5
5
  platform: x86-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-04 00:00:00.000000000 Z
23
+ date: 2022-05-08 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: racc