nokogiri 1.13.5-x86_64-darwin → 1.13.6-x86_64-darwin

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: ec50569376e6ed1b8ec0f016a712225a1df9326f312f4fb052b01cb56368a065
4
- data.tar.gz: f46de8125e33ce273724bbb0e3d8b3095d179e7ceec53552e7d9d75acaaa247b
3
+ metadata.gz: 5a06598f349a27cc5a2b36c6159bd2deb0751807eedb36eddf1f6dfb42edfe1f
4
+ data.tar.gz: 2573822a8d9a938fa36b97e55800eea2b5cb1d7f8f22bd0cdcd8844375620fa8
5
5
  SHA512:
6
- metadata.gz: 0ff2c065437934ef067e02dc829002e2681dac352736adb8522d5a0d5620305226e017e14c148cb80bd79b45a6cc4ae1085a3452d98d64b72b8d697f2acde7f7
7
- data.tar.gz: 6df1baf8c4b50763e0e672d4fb5c7590afdd318369e1eaca680dad20f049062feda8712c1b0c471a793eaef00b7c3c9ace9e761ff530eb96ef1a5dfca95e29db
6
+ metadata.gz: c0e68c678fddddbbfc5443547cfdba9dae60d7779495ef6b308c021fefb36ec13b10f036661a6558fd433bdd87a760a6117c04bbec07a18349602f16e0192623
7
+ data.tar.gz: 7166aa1b1617fcb9b0893ce613997255f98a2410863ef1b67dd13741bed2d1d41c62348dbeb1459a848f1c977c36edab962722dd214cdd0fe99d62bab6cc3794
@@ -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/x86_64-darwin/libxslt/1.1.35/lib/libxslt-plugins"
136
+ #define LIBXSLT_DEFAULT_PLUGINS_PATH() "/home/flavorjones/code/oss/nokogiri/ports/arm64-darwin/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_64-darwin
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