nokogiri 1.5.5.rc1-x86-mingw32 → 1.5.5.rc2-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.

@@ -6,6 +6,14 @@
6
6
 
7
7
  * JRuby Nokogiri の add_previous_sibling が以前は動いていたのに今は動かない(1.5.0 -> 1.5.1)。 #691 (ありがとう, John Shahid!)
8
8
  * JRuby バーションは URL が引数にあたえられると HTML ドキュメントを作れない。 #674 (ありがとう, John Shahid!)
9
+ * JRuby バージョンは HTMLとして nil か "" が与えられると NullPointerException を投げる。 #699
10
+ * JRuby 1.9 モードでエラー, uncaught throw 'encoding_found', が発生する。 #673
11
+ * JRuby で US-ASCII にエンコードされた文字列が正しくないエンコードを返してくる。 #583
12
+ * 512 文字以上が与えられたときに XmlSaxPushParser が IndexOutOfBoundsException を投げる。#567, #615
13
+ * Xpath を評価した結果、空の NodeSet が帰ってくる場合に、NodeSet が持っている Document の decorate に失敗して例外が投げられる。#514
14
+ * JRuby で xpath を namespace 付きで指定した場合に、エラーが発生する。pull request #681 (ありがとう, Piotr Szmielew)
15
+ * JRuby で Nokogiri::XML::Node を継承したクラスを定義すると、namespace が表示されない。 #695
16
+ * JRuby で RDF::RDFXML::Writer をインスタンス化しようとすると NAMESPACE_ERR (org.w3c.dom.DOMException) が発生する. #683
9
17
 
10
18
 
11
19
  == 1.5.4 / 2012年6月12日
@@ -4,8 +4,16 @@
4
4
 
5
5
  * Bugfixes
6
6
 
7
- * Regression in JRuby Nokogiri add_previous_sibling (1.5.0 -> 1.5.1) #691 (Thanks, Shahid!)
8
- * JRuby unable to create HTML doc if URL arg provided #674 (Thanks, Shahid!)
7
+ * Regression in JRuby Nokogiri add_previous_sibling (1.5.0 -> 1.5.1) #691 (Thanks, John Shahid!)
8
+ * JRuby unable to create HTML doc if URL arg provided #674 (Thanks, John Shahid!)
9
+ * JRuby raises NullPointerException when given HTML document is nil or empty string. #699
10
+ * JRuby 1.9 error, uncaught throw 'encoding_found', has been fixed. #673
11
+ * Invalid encoding returned in JRuby with US-ASCII. #583
12
+ * XmlSaxPushParser raises IndexOutOfBoundsException when over 512 characters are given. #567, #615
13
+ * When xpath evaluation returns empty NodeSet, decorating NodeSet's base document raises exception. #514
14
+ * JRuby raises exception when xpath with namespace is specified. pull request #681 (Thanks, Piotr Szmielew)
15
+ * JRuby renders nodes without their namespace when subclassing Node. #695
16
+ * JRuby raises NAMESPACE_ERR (org.w3c.dom.DOMException) while instantiating RDF::RDFXML::Writer. #683
9
17
 
10
18
 
11
19
  == 1.5.4 / 2012-06-12
data/Rakefile CHANGED
@@ -34,8 +34,8 @@ HOE = Hoe.spec 'nokogiri' do
34
34
  'nokogiri.gemspec',
35
35
  'lib/nokogiri/nokogiri.{bundle,jar,rb,so}',
36
36
  'lib/nokogiri/1.{8,9}',
37
- GENERATED_PARSER,
38
- GENERATED_TOKENIZER
37
+ # GENERATED_PARSER,
38
+ # GENERATED_TOKENIZER
39
39
  ]
40
40
 
41
41
  self.extra_dev_deps += [
@@ -45,11 +45,15 @@ HOE = Hoe.spec 'nokogiri' do
45
45
  ["hoe-git", ">= 1.4"],
46
46
  ["mini_portile", ">= 0.2.2"],
47
47
  ["minitest", "~> 2.2.2"],
48
- ["racc", ">= 1.4.6"],
49
48
  ["rake", ">= 0.9"],
50
- ["rake-compiler", "= 0.8.0"],
51
- ["rexical", ">= 1.0.5"],
49
+ ["rake-compiler", "= 0.8.0"]
52
50
  ]
51
+ if ! java?
52
+ self.extra_dev_deps += [
53
+ ["racc", ">= 1.4.6"],
54
+ ["rexical", ">= 1.0.5"]
55
+ ]
56
+ end
53
57
 
54
58
  if java?
55
59
  self.spec_extras = { :platform => 'java' }
Binary file
Binary file
@@ -14,100 +14,96 @@ module Nokogiri
14
14
  ##### State transition tables begin ###
15
15
 
16
16
  racc_action_table = [
17
- 6, 62, 7, 63, 14, 19, 23, 26, 20, 2,
18
- 71, 14, 6, 63, 85, 17, 14, 22, 25, 28,
19
- 83, 2, 7, 72, 11, 13, 15, -26, 20, 7,
20
- 49, 28, 13, 70, 7, 20, 11, 13, 15, 6,
21
- 20, 64, 65, 14, 19, 23, 26, 64, 2, 36,
22
- 59, 6, 60, 67, 17, 14, 22, 25, 28, 90,
23
- 2, 7, 6, 11, 13, 15, 14, 20, 66, 67,
24
- 28, 2, 91, 7, 14, 11, 13, 15, 14, 20,
25
- 69, 28, 6, 2, 7, 68, 11, 13, 15, 14,
26
- 20, 37, 7, 39, 94, 13, 7, 14, 20, 13,
27
- 15, 28, 20, 6, 49, 14, 11, 7, 36, 59,
28
- 13, 60, 53, 20, 14, 7, 36, 59, 13, 60,
29
- 95, 20, 28, 7, 101, 100, 13, 11, 49, 20,
30
- 74, 76, 7, 36, 31, 13, 33, 50, 20, 74,
31
- 76, 75, 77, 79, 98, 80, 32, 99, 42, 73,
32
- 75, 77, 79, 102, 80, 19, 23, 26, 73, 36,
33
- 59, -26, 60, 104, 105, 17, nil, 22, 25 ]
17
+ 21, 4, 5, 7, 29, 4, 5, 7, 30, 19,
18
+ -26, 6, 21, 9, 8, 6, 29, 9, 8, 22,
19
+ 31, 19, 20, 21, 23, 15, 17, 29, 24, 83,
20
+ 31, 22, 19, 84, 20, 21, 23, 15, 17, 29,
21
+ 24, 92, 22, 85, 19, 20, 21, 23, 15, 17,
22
+ 20, 24, 82, 90, 22, 59, 24, 20, 89, 23,
23
+ 15, 17, 21, 24, 88, 22, 29, 4, 5, 7,
24
+ 23, 19, 71, 29, 91, 29, 86, 6, 19, 9,
25
+ 8, 22, 29, 29, 20, 89, 23, 15, 17, 35,
26
+ 24, 20, 29, 20, 15, 17, 15, 24, 35, 24,
27
+ 20, 20, 29, 15, 15, 93, 24, 24, 21, 64,
28
+ 20, 95, 29, 15, 97, 96, 24, 43, -26, 46,
29
+ 20, 52, 53, 15, 51, 98, 24, 22, 79, 80,
30
+ 20, 99, 23, 15, 48, 42, 24, 79, 80, 75,
31
+ 76, 77, 101, 78, 87, 86, 41, 74, 75, 76,
32
+ 77, 35, 78, 104, 52, 56, 74, 55, 52, 56,
33
+ 105, 55, 52, 56, nil, 55, 52, 56, nil, 55 ]
34
34
 
35
35
  racc_action_check = [
36
- 0, 29, 21, 45, 0, 0, 0, 0, 21, 0,
37
- 38, 24, 63, 29, 45, 0, 63, 0, 0, 0,
38
- 42, 63, 0, 39, 0, 0, 0, 37, 0, 24,
39
- 47, 63, 24, 36, 63, 24, 63, 63, 63, 11,
40
- 63, 59, 31, 11, 11, 11, 11, 31, 11, 70,
41
- 70, 9, 70, 60, 11, 9, 11, 11, 11, 61,
42
- 9, 11, 44, 11, 11, 11, 44, 11, 33, 33,
43
- 9, 44, 62, 9, 87, 9, 9, 9, 49, 9,
44
- 35, 44, 7, 49, 44, 34, 44, 44, 44, 12,
45
- 44, 7, 87, 7, 65, 87, 49, 27, 87, 49,
46
- 49, 7, 49, 20, 12, 18, 7, 12, 64, 64,
47
- 12, 64, 20, 12, 1, 27, 28, 28, 27, 28,
48
- 66, 27, 20, 18, 81, 81, 18, 20, 16, 18,
49
- 41, 41, 1, 6, 6, 1, 6, 13, 1, 40,
50
- 40, 41, 41, 41, 71, 41, 6, 78, 8, 41,
51
- 40, 40, 40, 82, 40, 10, 10, 10, 40, 67,
52
- 67, 2, 67, 89, 95, 10, nil, 10, 10 ]
36
+ 0, 14, 14, 14, 0, 0, 0, 0, 1, 0,
37
+ 43, 14, 40, 14, 14, 0, 40, 0, 0, 0,
38
+ 1, 40, 0, 31, 0, 0, 0, 31, 0, 47,
39
+ 57, 40, 31, 49, 40, 13, 40, 40, 40, 13,
40
+ 40, 57, 31, 50, 13, 31, 24, 31, 31, 31,
41
+ 11, 31, 46, 53, 13, 24, 11, 13, 53, 13,
42
+ 13, 13, 23, 13, 52, 24, 23, 23, 23, 23,
43
+ 24, 23, 42, 35, 54, 28, 55, 23, 35, 23,
44
+ 23, 23, 27, 10, 23, 56, 23, 23, 23, 33,
45
+ 23, 35, 26, 28, 35, 35, 28, 35, 10, 28,
46
+ 27, 10, 25, 27, 10, 67, 27, 10, 20, 30,
47
+ 26, 72, 68, 26, 73, 73, 26, 20, 19, 20,
48
+ 25, 21, 21, 25, 21, 81, 25, 20, 45, 45,
49
+ 68, 83, 20, 68, 21, 18, 68, 44, 44, 45,
50
+ 45, 45, 87, 45, 51, 51, 15, 45, 44, 44,
51
+ 44, 12, 44, 90, 89, 89, 44, 89, 86, 86,
52
+ 101, 86, 88, 88, nil, 88, 22, 22, nil, 22 ]
53
53
 
54
54
  racc_action_pointer = [
55
- -2, 108, 132, nil, nil, nil, 123, 80, 119, 49,
56
- 148, 37, 83, 126, nil, nil, 107, nil, 99, nil,
57
- 101, -22, nil, nil, 5, nil, nil, 91, 106, 1,
58
- nil, 35, nil, 57, 62, 57, 21, -2, -19, -2,
59
- 136, 127, 9, nil, 60, -9, nil, 9, nil, 72,
60
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 29,
61
- 41, 36, 72, 10, 98, 81, 113, 149, nil, nil,
62
- 39, 133, nil, nil, nil, nil, nil, nil, 122, nil,
63
- nil, 114, 128, nil, nil, nil, nil, 68, nil, 140,
64
- nil, nil, nil, nil, nil, 151, nil, nil, nil, nil,
65
- nil, nil, nil, nil, nil, nil ]
55
+ -2, 8, nil, nil, nil, nil, nil, nil, nil, nil,
56
+ 77, 26, 130, 33, -6, 135, nil, nil, 106, 89,
57
+ 106, 111, 156, 60, 44, 96, 86, 76, 69, nil,
58
+ 109, 21, nil, 68, nil, 67, nil, nil, nil, nil,
59
+ 10, nil, 61, -19, 134, 125, 27, 0, nil, 10,
60
+ 20, 133, 52, 46, 51, 64, 73, 18, nil, nil,
61
+ nil, nil, nil, nil, nil, nil, nil, 82, 106, nil,
62
+ nil, nil, 86, 104, nil, nil, nil, nil, nil, nil,
63
+ nil, 100, nil, 120, nil, nil, 148, 135, 152, 144,
64
+ 140, nil, nil, nil, nil, nil, nil, nil, nil, nil,
65
+ nil, 147, nil, nil, nil, nil ]
66
66
 
67
67
  racc_action_default = [
68
- -27, -56, -25, -3, -22, -2, -74, -27, -74, -27,
69
- -20, -27, -50, -74, -59, -23, -17, -6, -55, -4,
70
- -74, -13, -9, -5, -58, -8, -7, -57, -74, -74,
71
- -52, -43, -33, -41, -74, -74, -42, -32, -74, -74,
72
- -62, -62, -74, -18, -27, -74, -10, -49, -12, -27,
73
- -21, -16, -51, -48, -47, -14, -15, -54, -53, -43,
74
- -41, -74, -74, -27, -74, -74, -46, -74, -34, -35,
75
- -74, -74, -30, -63, -68, -64, -69, -65, -74, -66,
76
- -67, -74, -74, -24, -19, -37, -11, -71, -73, -74,
77
- -36, 106, -1, -40, -45, -74, -38, -39, -31, -28,
78
- -60, -61, -29, -72, -70, -44 ]
68
+ -27, -74, -2, -3, -4, -5, -6, -7, -8, -9,
69
+ -50, -13, -17, -27, -20, -74, -22, -23, -74, -25,
70
+ -27, -74, -74, -27, -74, -55, -56, -57, -58, -59,
71
+ -74, -27, -10, -49, -12, -27, -14, -15, -16, -18,
72
+ -27, -21, -74, -32, -62, -62, -74, -74, -33, -74,
73
+ -74, -41, -42, -43, -74, -41, -43, -74, -47, -48,
74
+ -51, -52, -53, -54, 106, -1, -11, -74, -71, -73,
75
+ -19, -24, -74, -74, -63, -64, -65, -66, -67, -68,
76
+ -69, -74, -30, -74, -34, -35, -74, -46, -74, -74,
77
+ -74, -36, -37, -70, -72, -28, -60, -61, -29, -31,
78
+ -38, -74, -39, -40, -45, -44 ]
79
79
 
80
80
  racc_goto_table = [
81
- 30, 43, 34, 48, 29, 41, 55, 51, 78, 82,
82
- 46, 47, 56, 38, 40, 45, 87, 52, 54, 44,
83
- 35, 89, nil, 57, 61, nil, 58, nil, nil, nil,
84
- nil, nil, nil, nil, nil, nil, 84, nil, 86, nil,
85
- nil, nil, nil, nil, nil, nil, nil, nil, 88, nil,
86
- nil, nil, nil, nil, nil, 92, nil, nil, nil, nil,
87
- 93, nil, nil, 96, nil, nil, 97, nil, nil, nil,
81
+ 49, 54, 33, 39, 36, 1, 34, 45, 38, 72,
82
+ 81, 58, 32, 37, 47, 44, 68, 60, 61, 62,
83
+ 63, 65, 40, 50, 67, nil, nil, 69, 57, 66,
84
+ 70, nil, nil, nil, nil, nil, nil, nil, nil, nil,
88
85
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
89
- nil, nil, nil, nil, nil, nil, 103 ]
86
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
87
+ 94, nil, nil, nil, nil, 100, nil, 102, 103 ]
90
88
 
91
89
  racc_goto_check = [
92
- 8, 2, 18, 9, 1, 10, 11, 9, 17, 17,
93
- 7, 8, 12, 15, 16, 1, 6, 8, 10, 4,
94
- 19, 22, nil, 8, 18, nil, 8, nil, nil, nil,
95
- nil, nil, nil, nil, nil, nil, 2, nil, 9, nil,
96
- nil, nil, nil, nil, nil, nil, nil, nil, 8, nil,
97
- nil, nil, nil, nil, nil, 2, nil, nil, nil, nil,
98
- 18, nil, nil, 18, nil, nil, 18, nil, nil, nil,
90
+ 18, 18, 8, 2, 11, 1, 9, 10, 9, 17,
91
+ 17, 10, 7, 12, 15, 16, 6, 8, 8, 8,
92
+ 8, 2, 4, 19, 22, nil, nil, 8, 1, 9,
93
+ 2, nil, nil, nil, nil, nil, nil, nil, nil, nil,
94
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
99
95
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
100
- nil, nil, nil, nil, nil, nil, 8 ]
96
+ 8, nil, nil, nil, nil, 18, nil, 18, 18 ]
101
97
 
102
98
  racc_goto_pointer = [
103
- nil, 4, -8, nil, 9, nil, -33, -2, -1, -9,
104
- -2, -15, -9, nil, nil, 6, 7, -32, -4, 14,
105
- nil, nil, -28 ]
99
+ nil, 5, -10, nil, 8, nil, -19, 2, -8, -4,
100
+ -13, -7, 2, nil, nil, -6, -5, -35, -21, 2,
101
+ nil, nil, -11 ]
106
102
 
107
103
  racc_goto_default = [
108
- nil, nil, 3, 5, 9, 10, 12, nil, 16, nil,
109
- 21, 24, 27, 1, 4, 8, nil, nil, nil, nil,
110
- 18, 81, nil ]
104
+ nil, nil, 3, 2, 13, 14, 10, nil, 12, nil,
105
+ 11, 28, 27, 26, 16, 18, nil, nil, nil, nil,
106
+ 25, 73, nil ]
111
107
 
112
108
  racc_reduce_table = [
113
109
  0, 0, :racc_error,
@@ -180,7 +180,7 @@ module Nokogiri
180
180
  m = chunk.match(/(<meta\s)(.*)(charset\s*=\s*([\w-]+))(.*)/i) and
181
181
  return m[4]
182
182
  catch(:encoding_found) {
183
- Nokogiri::HTML::SAX::Parser.new(JumpSAXHandler.new(:encoding_found.to_s)).parse(chunk)
183
+ Nokogiri::HTML::SAX::Parser.new(JumpSAXHandler.new(:encoding_found)).parse(chunk)
184
184
  nil
185
185
  }
186
186
  else
@@ -1,6 +1,6 @@
1
1
  module Nokogiri
2
2
  # The version of Nokogiri you are using
3
- VERSION = '1.5.5.rc1'
3
+ VERSION = '1.5.5.rc2'
4
4
 
5
5
  class VersionInfo # :nodoc:
6
6
  def jruby?
@@ -150,7 +150,7 @@ module Nokogiri
150
150
  sets = paths.map { |path|
151
151
  ctx = XPathContext.new(self)
152
152
  ctx.register_namespaces(ns)
153
- path = path.gsub(/\/xmlns:/,'/:') unless Nokogiri.uses_libxml?
153
+ path = path.gsub(/xmlns:/, ' :') unless Nokogiri.uses_libxml?
154
154
 
155
155
  binds.each do |key,value|
156
156
  ctx.register_variable key.to_s, value
@@ -517,6 +517,12 @@ eohtml
517
517
  assert @html.serialize
518
518
  assert @html.to_html
519
519
  end
520
+
521
+ def test_empty_document
522
+ # empty document should return "" #699
523
+ assert_equal "", Nokogiri::HTML.parse(nil).text
524
+ assert_equal "", Nokogiri::HTML.parse("").text
525
+ end
520
526
  end
521
527
  end
522
528
  end
@@ -263,6 +263,33 @@ module Nokogiri
263
263
  }.new)
264
264
  assert_equal foo, doc.xpath("//foo")
265
265
  end
266
+
267
+ def test_node_set_should_be_decorated
268
+ # "called decorate on nill" exception in JRuby issue#514
269
+ process_output= <<END
270
+ <test>
271
+ <track type="Image">
272
+ <Format>LZ77</Format>
273
+ </test>
274
+ END
275
+ doc = Nokogiri::XML.parse(process_output)
276
+ node = doc.xpath(%{//track[@type='Video']})
277
+ assert_equal "[]", node.xpath("Format").inspect
278
+ end
279
+
280
+ def test_very_specific_xml_xpath_making_problems_in_jruby
281
+ # manually merges pull request #681
282
+ xml_string = %q{<?xml version="1.0" encoding="UTF-8"?>
283
+ <ONIXMessage xmlns:elibri="http://elibri.com.pl/ns/extensions" release="3.0" xmlns="http://www.editeur.org/onix/3.0/reference">
284
+ <Product>
285
+ <RecordReference>a</RecordReference>
286
+ </Product>
287
+ </ONIXMessage>}
288
+
289
+ xml_doc = Nokogiri::XML(xml_string)
290
+ onix = xml_doc.children.first
291
+ assert_equal 'a', onix.at_xpath('xmlns:Product').at_xpath('xmlns:RecordReference').text
292
+ end
266
293
  end
267
294
  end
268
295
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- hash: -925257406
4
+ hash: -942039246
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
9
  - 5
10
10
  - rc
11
- - 1
12
- version: 1.5.5.rc1
11
+ - 2
12
+ version: 1.5.5.rc2
13
13
  platform: x86-mingw32
14
14
  authors:
15
15
  - Aaron Patterson
@@ -20,7 +20,7 @@ autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
22
 
23
- date: 2012-06-12 00:00:00 Z
23
+ date: 2012-06-14 00:00:00 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hoe-bundler
@@ -116,50 +116,50 @@ dependencies:
116
116
  type: :development
117
117
  version_requirements: *id006
118
118
  - !ruby/object:Gem::Dependency
119
- name: racc
119
+ name: rake
120
120
  prerelease: false
121
121
  requirement: &id007 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
- hash: 11
126
+ hash: 25
127
127
  segments:
128
- - 1
129
- - 4
130
- - 6
131
- version: 1.4.6
128
+ - 0
129
+ - 9
130
+ version: "0.9"
132
131
  type: :development
133
132
  version_requirements: *id007
134
133
  - !ruby/object:Gem::Dependency
135
- name: rake
134
+ name: rake-compiler
136
135
  prerelease: false
137
136
  requirement: &id008 !ruby/object:Gem::Requirement
138
137
  none: false
139
138
  requirements:
140
- - - ">="
139
+ - - "="
141
140
  - !ruby/object:Gem::Version
142
- hash: 25
141
+ hash: 63
143
142
  segments:
144
143
  - 0
145
- - 9
146
- version: "0.9"
144
+ - 8
145
+ - 0
146
+ version: 0.8.0
147
147
  type: :development
148
148
  version_requirements: *id008
149
149
  - !ruby/object:Gem::Dependency
150
- name: rake-compiler
150
+ name: racc
151
151
  prerelease: false
152
152
  requirement: &id009 !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
155
- - - "="
155
+ - - ">="
156
156
  - !ruby/object:Gem::Version
157
- hash: 63
157
+ hash: 11
158
158
  segments:
159
- - 0
160
- - 8
161
- - 0
162
- version: 0.8.0
159
+ - 1
160
+ - 4
161
+ - 6
162
+ version: 1.4.6
163
163
  type: :development
164
164
  version_requirements: *id009
165
165
  - !ruby/object:Gem::Dependency