nokogiri 1.10.10-x64-mingw32 → 1.11.0.rc1-x64-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.

Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -17
  3. data/ext/nokogiri/extconf.rb +44 -35
  4. data/ext/nokogiri/nokogiri.c +12 -6
  5. data/ext/nokogiri/nokogiri.h +1 -0
  6. data/ext/nokogiri/xml_document.c +10 -1
  7. data/ext/nokogiri/xml_node.c +20 -0
  8. data/ext/nokogiri/xml_schema.c +0 -29
  9. data/ext/nokogiri/xslt_stylesheet.c +0 -4
  10. data/lib/nokogiri.rb +2 -19
  11. data/lib/nokogiri/2.4/nokogiri.so +0 -0
  12. data/lib/nokogiri/2.5/nokogiri.so +0 -0
  13. data/lib/nokogiri/2.6/nokogiri.so +0 -0
  14. data/lib/nokogiri/2.7/nokogiri.so +0 -0
  15. data/lib/nokogiri/css.rb +1 -0
  16. data/lib/nokogiri/css/node.rb +1 -0
  17. data/lib/nokogiri/css/parser.rb +1 -0
  18. data/lib/nokogiri/css/parser_extras.rb +1 -0
  19. data/lib/nokogiri/css/syntax_error.rb +1 -0
  20. data/lib/nokogiri/css/tokenizer.rb +1 -0
  21. data/lib/nokogiri/css/xpath_visitor.rb +3 -1
  22. data/lib/nokogiri/decorators/slop.rb +1 -0
  23. data/lib/nokogiri/html.rb +1 -0
  24. data/lib/nokogiri/html/builder.rb +1 -0
  25. data/lib/nokogiri/html/document.rb +1 -0
  26. data/lib/nokogiri/html/document_fragment.rb +1 -0
  27. data/lib/nokogiri/html/element_description.rb +1 -0
  28. data/lib/nokogiri/html/element_description_defaults.rb +1 -0
  29. data/lib/nokogiri/html/entity_lookup.rb +1 -0
  30. data/lib/nokogiri/html/sax/parser.rb +1 -0
  31. data/lib/nokogiri/html/sax/parser_context.rb +1 -0
  32. data/lib/nokogiri/html/sax/push_parser.rb +1 -0
  33. data/lib/nokogiri/jruby/dependencies.rb +20 -0
  34. data/lib/nokogiri/syntax_error.rb +1 -0
  35. data/lib/nokogiri/version.rb +85 -45
  36. data/lib/nokogiri/xml.rb +1 -0
  37. data/lib/nokogiri/xml/attr.rb +1 -0
  38. data/lib/nokogiri/xml/attribute_decl.rb +1 -0
  39. data/lib/nokogiri/xml/builder.rb +1 -0
  40. data/lib/nokogiri/xml/cdata.rb +1 -0
  41. data/lib/nokogiri/xml/character_data.rb +1 -0
  42. data/lib/nokogiri/xml/document.rb +3 -8
  43. data/lib/nokogiri/xml/document_fragment.rb +1 -0
  44. data/lib/nokogiri/xml/dtd.rb +1 -0
  45. data/lib/nokogiri/xml/element_content.rb +1 -0
  46. data/lib/nokogiri/xml/element_decl.rb +1 -0
  47. data/lib/nokogiri/xml/entity_decl.rb +1 -0
  48. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  49. data/lib/nokogiri/xml/namespace.rb +1 -0
  50. data/lib/nokogiri/xml/node.rb +26 -12
  51. data/lib/nokogiri/xml/node/save_options.rb +1 -0
  52. data/lib/nokogiri/xml/node_set.rb +1 -0
  53. data/lib/nokogiri/xml/notation.rb +1 -0
  54. data/lib/nokogiri/xml/parse_options.rb +4 -3
  55. data/lib/nokogiri/xml/pp.rb +1 -0
  56. data/lib/nokogiri/xml/pp/character_data.rb +1 -0
  57. data/lib/nokogiri/xml/pp/node.rb +1 -0
  58. data/lib/nokogiri/xml/processing_instruction.rb +1 -0
  59. data/lib/nokogiri/xml/reader.rb +7 -3
  60. data/lib/nokogiri/xml/relax_ng.rb +1 -0
  61. data/lib/nokogiri/xml/sax.rb +1 -0
  62. data/lib/nokogiri/xml/sax/document.rb +1 -0
  63. data/lib/nokogiri/xml/sax/parser.rb +1 -0
  64. data/lib/nokogiri/xml/sax/parser_context.rb +1 -0
  65. data/lib/nokogiri/xml/sax/push_parser.rb +1 -0
  66. data/lib/nokogiri/xml/schema.rb +1 -0
  67. data/lib/nokogiri/xml/searchable.rb +1 -0
  68. data/lib/nokogiri/xml/syntax_error.rb +1 -0
  69. data/lib/nokogiri/xml/text.rb +1 -0
  70. data/lib/nokogiri/xml/xpath.rb +1 -0
  71. data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -0
  72. data/lib/nokogiri/xml/xpath_context.rb +1 -0
  73. data/lib/nokogiri/xslt.rb +1 -0
  74. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  75. data/lib/xsd/xmlparser/nokogiri.rb +1 -0
  76. metadata +26 -26
  77. data/lib/nokogiri/2.3/nokogiri.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d60b52d7f07bfb0187de2cca88833a70498f002f463ac82f08b8359908df80b
4
- data.tar.gz: 169b48cd81195b892ddd0976956ffdf7c1be89d486cdeb78bbbf87bfeb0c4cb1
3
+ metadata.gz: 8ce7fb87f24cd35d7a9a649cabe5cc1ce48d5e8f67411584911223bfe53935c0
4
+ data.tar.gz: '09b812276bd345594649f6c1c1fc840b26c4402b384983f9f9e014084900cac1'
5
5
  SHA512:
6
- metadata.gz: ab637fb1527d865c3ce13130c363a3969abd7d6dfe2e5ca769956a89572990ca078cc27c06831337d2433a94a776bcad87b9a986303f4cd1955551663aedae3f
7
- data.tar.gz: 5f5009a359ef8984f3b8ba817af06efdb56c9071c9e459155a5d4b96059ac3c8e5bf19b3c8d116a1b9fa5432e6b5eb2fe59e12a9e5aa0d2b8eaa447623860ce9
6
+ metadata.gz: 8684e860a4e799e9806184b2366f2fb7742428323849a3f66012f9e0145a55d945c3f71df208e67d22c3d871aff8f30fe81f2621ac50ab3014c45f1284ed2ca0
7
+ data.tar.gz: f26d82e26577abff0f6da8547a14e570452b7a6b15ba17925f9dbffa349c15cee561de9c2a90058e856ccf4cde3b1ebb69b96849727e144fc08f2b1541f91473
data/README.md CHANGED
@@ -26,7 +26,7 @@ or CSS3 selectors.
26
26
  [![Test Coverage](https://api.codeclimate.com/v1/badges/59c67b0e8976027a45ad/test_coverage)](https://codeclimate.com/github/sparklemotion/nokogiri/test_coverage)
27
27
 
28
28
  [![Gem Version](https://badge.fury.io/rb/nokogiri.svg)](https://rubygems.org/gems/nokogiri)
29
- [![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)
29
+ [![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score/?dependency-name=nokogiri&package-manager=bundler)
30
30
  [![Tidelift dependencies](https://tidelift.com/badges/github/sparklemotion/nokogiri)](https://tidelift.com/subscription/pkg/rubygems-nokogiri?utm_source=rubygems-nokogiri&utm_medium=referral&utm_campaign=readme)
31
31
 
32
32
 
@@ -129,27 +129,23 @@ end
129
129
 
130
130
  ## Requirements
131
131
 
132
- * Ruby 2.3.0 or higher, including any development packages necessary
133
- to compile native extensions.
132
+ Ruby 2.4.0 or higher, including any development packages necessary to compile native extensions.
134
133
 
135
- * In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the
136
- gem, but if you want to use the system versions:
134
+ In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the gem, but if you want to use the system versions:
137
135
 
138
- * First, check out [the long list](http://www.xmlsoft.org/news.html)
139
- of fixes and changes between releases before deciding to use any
140
- version older than is bundled with Nokogiri.
136
+ * First, check out [the long list](http://www.xmlsoft.org/news.html)
137
+ of fixes and changes between releases before deciding to use any
138
+ version older than is bundled with Nokogiri.
141
139
 
142
- * At install time, set the environment variable
143
- `NOKOGIRI_USE_SYSTEM_LIBRARIES` or else use the
144
- `--use-system-libraries` argument. (See
145
- https://nokogiri.org/tutorials/installing_nokogiri.html#install-with-system-libraries
146
- for specifics.)
140
+ * At install time, set the environment variable
141
+ `NOKOGIRI_USE_SYSTEM_LIBRARIES` or else use the
142
+ `--use-system-libraries` argument. (See
143
+ https://nokogiri.org/tutorials/installing_nokogiri.html#install-with-system-libraries
144
+ for specifics.)
147
145
 
148
- * libxml2 >=2.6.21 with iconv support
149
- (libxml2-dev/-devel is also required)
146
+ * libxml2 >=2.6.21 with iconv support (libxml2-dev/-devel is also required)
150
147
 
151
- * libxslt, built with and supported by the given libxml2
152
- (libxslt-dev/-devel is also required)
148
+ * libxslt, built with and supported by the given libxml2 (libxslt-dev/-devel is also required)
153
149
 
154
150
 
155
151
  ## Encoding
@@ -191,6 +187,12 @@ explicitly setting the encoding to EUC-JP on the parser:
191
187
  We've adopted the Contributor Covenant code of conduct, which you can read in full in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md).
192
188
 
193
189
 
190
+ ## Semantic Versioning
191
+
192
+ [![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score/?dependency-name=nokogiri&package-manager=bundler)
193
+
194
+ Nokogiri follows [Semantic Versioning](https://semver.org/). See [`CHANGELOG.md`](CHANGELOG.md) for more details.
195
+
194
196
  ## License
195
197
 
196
198
  This project is licensed under the terms of the MIT license.
@@ -486,50 +486,60 @@ else
486
486
  url: "http://zlib.net/fossils/#{recipe.name}-#{recipe.version}.tar.gz",
487
487
  sha256: dependencies["zlib"]["sha256"]
488
488
  }]
489
- class << recipe
490
- attr_accessor :cross_build_p
491
-
492
- def configure
493
- Dir.chdir work_path do
494
- mk = File.read 'win32/Makefile.gcc'
495
- File.open 'win32/Makefile.gcc', 'wb' do |f|
496
- f.puts "BINARY_PATH = #{path}/bin"
497
- f.puts "LIBRARY_PATH = #{path}/lib"
498
- f.puts "INCLUDE_PATH = #{path}/include"
499
- mk.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{host}-") if cross_build_p
500
- f.puts mk
489
+ if windows?
490
+ class << recipe
491
+ attr_accessor :cross_build_p
492
+
493
+ def configure
494
+ Dir.chdir work_path do
495
+ mk = File.read 'win32/Makefile.gcc'
496
+ File.open 'win32/Makefile.gcc', 'wb' do |f|
497
+ f.puts "BINARY_PATH = #{path}/bin"
498
+ f.puts "LIBRARY_PATH = #{path}/lib"
499
+ f.puts "INCLUDE_PATH = #{path}/include"
500
+ mk.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{host}-") if cross_build_p
501
+ f.puts mk
502
+ end
501
503
  end
502
504
  end
503
- end
504
505
 
505
- def configured?
506
- Dir.chdir work_path do
507
- !! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/)
506
+ def configured?
507
+ Dir.chdir work_path do
508
+ !! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/)
509
+ end
508
510
  end
509
- end
510
511
 
511
- def compile
512
- execute "compile", "make -f win32/Makefile.gcc"
513
- end
512
+ def compile
513
+ execute "compile", "make -f win32/Makefile.gcc"
514
+ end
514
515
 
515
- def install
516
- execute "install", "make -f win32/Makefile.gcc install"
516
+ def install
517
+ execute "install", "make -f win32/Makefile.gcc install"
518
+ end
519
+ end
520
+ recipe.cross_build_p = cross_build_p
521
+ else
522
+ class << recipe
523
+ def configure
524
+ execute "configure", ["env", "CHOST=#{host}", "CFLAGS=-fPIC #{ENV['CFLAGS']}", "./configure", "--static", configure_prefix]
525
+ end
517
526
  end
518
527
  end
519
- recipe.cross_build_p = cross_build_p
520
528
  end
521
529
 
522
- libiconv_recipe = process_recipe("libiconv", dependencies["libiconv"]["version"], static_p, cross_build_p) do |recipe|
523
- recipe.files = [{
524
- url: "http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz",
525
- sha256: dependencies["libiconv"]["sha256"]
526
- }]
527
- recipe.configure_options += [
528
- "CPPFLAGS=-Wall",
529
- "CFLAGS=-O2 -g",
530
- "CXXFLAGS=-O2 -g",
531
- "LDFLAGS="
532
- ]
530
+ unless nix?
531
+ libiconv_recipe = process_recipe("libiconv", dependencies["libiconv"]["version"], static_p, cross_build_p) do |recipe|
532
+ recipe.files = [{
533
+ url: "http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz",
534
+ sha256: dependencies["libiconv"]["sha256"]
535
+ }]
536
+ recipe.configure_options += [
537
+ "CPPFLAGS=-Wall",
538
+ "CFLAGS=-O2 -g",
539
+ "CXXFLAGS=-O2 -g",
540
+ "LDFLAGS="
541
+ ]
542
+ end
533
543
  end
534
544
  else
535
545
  if darwin? && !have_header('iconv.h')
@@ -617,7 +627,6 @@ EOM
617
627
  end
618
628
 
619
629
  # Defining a macro that expands to a C string; double quotes are significant.
620
- $CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATH=\"#{recipe.path}\"".inspect
621
630
  $CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATCHES=\"#{recipe.patch_files.map { |path| File.basename(path) }.join(' ')}\"".inspect
622
631
 
623
632
  case libname
@@ -76,24 +76,30 @@ void Init_nokogiri()
76
76
  mNokogiriHtmlSax = rb_define_module_under(mNokogiriHtml, "SAX");
77
77
 
78
78
  rb_const_set( mNokogiri,
79
- rb_intern("LIBXML_VERSION"),
79
+ rb_intern("LIBXML_COMPILED_VERSION"),
80
80
  NOKOGIRI_STR_NEW2(LIBXML_DOTTED_VERSION)
81
81
  );
82
82
  rb_const_set( mNokogiri,
83
- rb_intern("LIBXML_PARSER_VERSION"),
83
+ rb_intern("LIBXML_LOADED_VERSION"),
84
84
  NOKOGIRI_STR_NEW2(xmlParserVersion)
85
85
  );
86
86
 
87
+
88
+ rb_const_set( mNokogiri,
89
+ rb_intern("LIBXSLT_COMPILED_VERSION"),
90
+ NOKOGIRI_STR_NEW2(LIBXSLT_DOTTED_VERSION)
91
+ );
92
+ rb_const_set( mNokogiri,
93
+ rb_intern("LIBXSLT_LOADED_VERSION"),
94
+ NOKOGIRI_STR_NEW2(xsltEngineVersion)
95
+ );
96
+
87
97
  #ifdef NOKOGIRI_USE_PACKAGED_LIBRARIES
88
98
  rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qtrue);
89
- rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATH));
90
- rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATH));
91
99
  rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATCHES), " "));
92
100
  rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATCHES), " "));
93
101
  #else
94
102
  rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qfalse);
95
- rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), Qnil);
96
- rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), Qnil);
97
103
  rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), Qnil);
98
104
  rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), Qnil);
99
105
  #endif
@@ -29,6 +29,7 @@ int vasprintf (char **strp, const char *fmt, va_list ap);
29
29
  #include <libxml/relaxng.h>
30
30
  #include <libxml/xinclude.h>
31
31
  #include <libxslt/extensions.h>
32
+ #include <libxslt/xsltconfig.h>
32
33
  #include <libxml/c14n.h>
33
34
  #include <ruby.h>
34
35
  #include <ruby/st.h>
@@ -38,6 +38,15 @@ static void remove_private(xmlNodePtr node)
38
38
  node->_private = NULL;
39
39
  }
40
40
 
41
+ static void mark(xmlDocPtr doc)
42
+ {
43
+ nokogiriTuplePtr tuple = (nokogiriTuplePtr)doc->_private;
44
+ if(tuple) {
45
+ rb_gc_mark(tuple->doc);
46
+ rb_gc_mark(tuple->node_cache);
47
+ }
48
+ }
49
+
41
50
  static void dealloc(xmlDocPtr doc)
42
51
  {
43
52
  st_table *node_hash;
@@ -588,7 +597,7 @@ VALUE Nokogiri_wrap_xml_document(VALUE klass, xmlDocPtr doc)
588
597
 
589
598
  VALUE rb_doc = Data_Wrap_Struct(
590
599
  klass ? klass : cNokogiriXmlDocument,
591
- 0,
600
+ mark,
592
601
  dealloc,
593
602
  doc
594
603
  );
@@ -1332,6 +1332,25 @@ static VALUE line(VALUE self)
1332
1332
  return INT2NUM(xmlGetLineNo(node));
1333
1333
  }
1334
1334
 
1335
+ /*
1336
+ * call-seq:
1337
+ * line=(num)
1338
+ *
1339
+ * Sets the line for this Node. num must be less than 65535.
1340
+ */
1341
+ static VALUE set_line(VALUE self, VALUE num)
1342
+ {
1343
+ xmlNodePtr node;
1344
+ Data_Get_Struct(self, xmlNode, node);
1345
+
1346
+ int value = NUM2INT(num);
1347
+ if (value < 65535) {
1348
+ node->line = value;
1349
+ }
1350
+
1351
+ return num;
1352
+ }
1353
+
1335
1354
  /*
1336
1355
  * call-seq:
1337
1356
  * add_namespace_definition(prefix, href)
@@ -1728,6 +1747,7 @@ void init_xml_node()
1728
1747
  rb_define_method(klass, "create_external_subset", create_external_subset, 3);
1729
1748
  rb_define_method(klass, "pointer_id", pointer_id, 0);
1730
1749
  rb_define_method(klass, "line", line, 0);
1750
+ rb_define_method(klass, "line=", set_line, 1);
1731
1751
  rb_define_method(klass, "content", get_native_content, 0);
1732
1752
  rb_define_method(klass, "native_content=", set_native_content, 1);
1733
1753
  rb_define_method(klass, "lang", get_lang, 0);
@@ -133,31 +133,6 @@ static VALUE read_memory(VALUE klass, VALUE content)
133
133
  return rb_schema;
134
134
  }
135
135
 
136
- /* Schema creation will remove and deallocate "blank" nodes.
137
- * If those blank nodes have been exposed to Ruby, they could get freed
138
- * out from under the VALUE pointer. This function checks to see if any of
139
- * those nodes have been exposed to Ruby, and if so we should raise an exception.
140
- */
141
- static int has_blank_nodes_p(VALUE cache)
142
- {
143
- long i;
144
-
145
- if (NIL_P(cache)) {
146
- return 0;
147
- }
148
-
149
- for (i = 0; i < RARRAY_LEN(cache); i++) {
150
- xmlNodePtr node;
151
- VALUE element = rb_ary_entry(cache, i);
152
- Data_Get_Struct(element, xmlNode, node);
153
- if (xmlIsBlankNode(node)) {
154
- return 1;
155
- }
156
- }
157
-
158
- return 0;
159
- }
160
-
161
136
  /*
162
137
  * call-seq:
163
138
  * from_document(doc)
@@ -177,10 +152,6 @@ static VALUE from_document(VALUE klass, VALUE document)
177
152
  /* In case someone passes us a node. ugh. */
178
153
  doc = doc->doc;
179
154
 
180
- if (has_blank_nodes_p(DOC_NODE_CACHE(doc))) {
181
- rb_raise(rb_eArgError, "Creating a schema from a document that has blank nodes exposed to Ruby is dangerous");
182
- }
183
-
184
155
  ctx = xmlSchemaNewDocParserCtxt(doc);
185
156
 
186
157
  errors = rb_ary_new();
@@ -109,10 +109,6 @@ static VALUE serialize(VALUE self, VALUE xmlobj)
109
109
  return rval ;
110
110
  }
111
111
 
112
- static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...)
113
- {
114
- }
115
-
116
112
  /*
117
113
  * call-seq:
118
114
  * transform(document, params = [])
@@ -1,28 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
+ # frozen_string_literal: true
2
3
  # Modify the PATH on windows so that the external DLLs will get loaded.
3
4
 
4
5
  require 'rbconfig'
5
6
 
6
7
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
7
- # The line below caused a problem on non-GAE rack environment.
8
- # unless defined?(JRuby::Rack::VERSION) || defined?(AppEngine::ApiProxy)
9
- #
10
- # However, simply cutting defined?(JRuby::Rack::VERSION) off resulted in
11
- # an unable-to-load-nokogiri problem. Thus, now, Nokogiri checks the presense
12
- # of appengine-rack.jar in $LOAD_PATH. If Nokogiri is on GAE, Nokogiri
13
- # should skip loading xml jars. This is because those are in WEB-INF/lib and
14
- # already set in the classpath.
15
- unless $LOAD_PATH.to_s.include?("appengine-rack")
16
- require 'stringio'
17
- require 'isorelax.jar'
18
- require 'jing.jar'
19
- require 'nekohtml.jar'
20
- require 'nekodtd.jar'
21
- require 'xercesImpl.jar'
22
- require 'serializer.jar'
23
- require 'xalan.jar'
24
- require 'xml-apis.jar'
25
- end
8
+ require 'nokogiri/jruby/dependencies'
26
9
  end
27
10
 
28
11
  begin
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/css/node'
2
3
  require 'nokogiri/css/xpath_visitor'
3
4
  x = $-w
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module CSS
3
4
  class Node
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # DO NOT MODIFY!!!!
3
4
  # This file is automatically generated by Racc 1.4.14
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'thread'
2
3
 
3
4
  module Nokogiri
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/syntax_error'
2
3
  module Nokogiri
3
4
  module CSS
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #--
2
3
  # DO NOT MODIFY!!!!
3
4
  # This file is automatically generated by rex 1.0.7
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module CSS
3
4
  class XPathVisitor # :nodoc:
@@ -51,7 +52,8 @@ module Nokogiri
51
52
  when /^comment\(/
52
53
  "comment()"
53
54
  when /^has\(/
54
- ".//#{node.value[1].accept(self)}"
55
+ is_direct = node.value[1].value[0].nil? # e.g. "has(> a)", "has(~ a)", "has(+ a)"
56
+ ".#{"//" if !is_direct}#{node.value[1].accept(self)}"
55
57
  else
56
58
  args = ['.'] + node.value[1..-1]
57
59
  "#{node.value.first}#{args.join(', ')})"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module Decorators
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'nokogiri/html/entity_lookup'
2
3
  require 'nokogiri/html/document'
3
4
  require 'nokogiri/html/document_fragment'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module HTML
3
4
  ###
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Nokogiri
2
3
  module HTML
3
4
  class Document < Nokogiri::XML::Document