diff-lcs 1.3 → 1.6.2

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.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +518 -0
  3. data/CODE_OF_CONDUCT.md +128 -0
  4. data/CONTRIBUTING.md +71 -0
  5. data/CONTRIBUTORS.md +49 -0
  6. data/{License.md → LICENCE.md} +21 -20
  7. data/Manifest.txt +84 -6
  8. data/README.md +92 -0
  9. data/Rakefile +104 -46
  10. data/SECURITY.md +41 -0
  11. data/bin/htmldiff +9 -6
  12. data/bin/ldiff +4 -1
  13. data/docs/artistic.txt +1 -1
  14. data/lib/diff/lcs/array.rb +2 -2
  15. data/lib/diff/lcs/backports.rb +13 -0
  16. data/lib/diff/lcs/block.rb +5 -5
  17. data/lib/diff/lcs/callbacks.rb +22 -17
  18. data/lib/diff/lcs/change.rb +44 -51
  19. data/lib/diff/lcs/htmldiff.rb +25 -14
  20. data/lib/diff/lcs/hunk.rb +174 -71
  21. data/lib/diff/lcs/internals.rb +57 -56
  22. data/lib/diff/lcs/ldiff.rb +101 -79
  23. data/lib/diff/lcs/string.rb +1 -1
  24. data/lib/diff/lcs/version.rb +7 -0
  25. data/lib/diff/lcs.rb +229 -212
  26. data/lib/diff-lcs.rb +2 -2
  27. data/mise.toml +5 -0
  28. data/spec/change_spec.rb +58 -34
  29. data/spec/diff_spec.rb +13 -9
  30. data/spec/fixtures/123_x +2 -0
  31. data/spec/fixtures/456_x +2 -0
  32. data/spec/fixtures/aX +1 -0
  33. data/spec/fixtures/bXaX +1 -0
  34. data/spec/fixtures/empty +0 -0
  35. data/spec/fixtures/file1.bin +0 -0
  36. data/spec/fixtures/file2.bin +0 -0
  37. data/spec/fixtures/four_lines +4 -0
  38. data/spec/fixtures/four_lines_with_missing_new_line +4 -0
  39. data/spec/fixtures/ldiff/diff.missing_new_line1-e +1 -0
  40. data/spec/fixtures/ldiff/diff.missing_new_line1-f +1 -0
  41. data/spec/fixtures/ldiff/diff.missing_new_line2-e +1 -0
  42. data/spec/fixtures/ldiff/diff.missing_new_line2-f +1 -0
  43. data/spec/fixtures/ldiff/error.diff.chef-e +2 -0
  44. data/spec/fixtures/ldiff/error.diff.chef-f +2 -0
  45. data/spec/fixtures/ldiff/error.diff.missing_new_line1-e +1 -0
  46. data/spec/fixtures/ldiff/error.diff.missing_new_line1-f +1 -0
  47. data/spec/fixtures/ldiff/error.diff.missing_new_line2-e +1 -0
  48. data/spec/fixtures/ldiff/error.diff.missing_new_line2-f +1 -0
  49. data/spec/fixtures/ldiff/output.diff +4 -0
  50. data/spec/fixtures/ldiff/output.diff-c +7 -0
  51. data/spec/fixtures/ldiff/output.diff-e +3 -0
  52. data/spec/fixtures/ldiff/output.diff-f +3 -0
  53. data/spec/fixtures/ldiff/output.diff-u +5 -0
  54. data/spec/fixtures/ldiff/output.diff.bin1 +0 -0
  55. data/spec/fixtures/ldiff/output.diff.bin1-c +0 -0
  56. data/spec/fixtures/ldiff/output.diff.bin1-e +0 -0
  57. data/spec/fixtures/ldiff/output.diff.bin1-f +0 -0
  58. data/spec/fixtures/ldiff/output.diff.bin1-u +0 -0
  59. data/spec/fixtures/ldiff/output.diff.bin2 +1 -0
  60. data/spec/fixtures/ldiff/output.diff.bin2-c +1 -0
  61. data/spec/fixtures/ldiff/output.diff.bin2-e +1 -0
  62. data/spec/fixtures/ldiff/output.diff.bin2-f +1 -0
  63. data/spec/fixtures/ldiff/output.diff.bin2-u +1 -0
  64. data/spec/fixtures/ldiff/output.diff.chef +4 -0
  65. data/spec/fixtures/ldiff/output.diff.chef-c +15 -0
  66. data/spec/fixtures/ldiff/output.diff.chef-e +3 -0
  67. data/spec/fixtures/ldiff/output.diff.chef-f +3 -0
  68. data/spec/fixtures/ldiff/output.diff.chef-u +9 -0
  69. data/spec/fixtures/ldiff/output.diff.chef2 +7 -0
  70. data/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
  71. data/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
  72. data/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
  73. data/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
  74. data/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
  75. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines +5 -0
  76. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-c +9 -0
  77. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-e +6 -0
  78. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-f +6 -0
  79. data/spec/fixtures/ldiff/output.diff.empty.vs.four_lines-u +7 -0
  80. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty +5 -0
  81. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-c +9 -0
  82. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-e +1 -0
  83. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-f +1 -0
  84. data/spec/fixtures/ldiff/output.diff.four_lines.vs.empty-u +7 -0
  85. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context +4 -0
  86. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-c +9 -0
  87. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-e +3 -0
  88. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-f +3 -0
  89. data/spec/fixtures/ldiff/output.diff.issue95_trailing_context-u +6 -0
  90. data/spec/fixtures/ldiff/output.diff.missing_new_line1 +5 -0
  91. data/spec/fixtures/ldiff/output.diff.missing_new_line1-c +14 -0
  92. data/spec/fixtures/ldiff/output.diff.missing_new_line1-e +0 -0
  93. data/spec/fixtures/ldiff/output.diff.missing_new_line1-f +0 -0
  94. data/spec/fixtures/ldiff/output.diff.missing_new_line1-u +9 -0
  95. data/spec/fixtures/ldiff/output.diff.missing_new_line2 +5 -0
  96. data/spec/fixtures/ldiff/output.diff.missing_new_line2-c +14 -0
  97. data/spec/fixtures/ldiff/output.diff.missing_new_line2-e +0 -0
  98. data/spec/fixtures/ldiff/output.diff.missing_new_line2-f +0 -0
  99. data/spec/fixtures/ldiff/output.diff.missing_new_line2-u +9 -0
  100. data/spec/fixtures/new-chef +4 -0
  101. data/spec/fixtures/new-chef2 +17 -0
  102. data/spec/fixtures/old-chef +4 -0
  103. data/spec/fixtures/old-chef2 +14 -0
  104. data/spec/hunk_spec.rb +49 -38
  105. data/spec/issues_spec.rb +132 -21
  106. data/spec/lcs_spec.rb +3 -3
  107. data/spec/ldiff_spec.rb +83 -30
  108. data/spec/patch_spec.rb +14 -20
  109. data/spec/sdiff_spec.rb +83 -81
  110. data/spec/spec_helper.rb +220 -165
  111. data/spec/traverse_balanced_spec.rb +138 -136
  112. data/spec/traverse_sequences_spec.rb +7 -9
  113. metadata +127 -77
  114. data/Code-of-Conduct.md +0 -74
  115. data/Contributing.md +0 -83
  116. data/History.md +0 -220
  117. data/README.rdoc +0 -84
  118. data/autotest/discover.rb +0 -1
data/spec/spec_helper.rb CHANGED
@@ -1,46 +1,70 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
- require 'rubygems'
4
- require 'pathname'
5
- require 'psych'
3
+ require "rubygems"
4
+ require "pathname"
6
5
 
7
- if ENV['COVERALLS']
8
- require 'coveralls'
9
- Coveralls.wear!
10
- elsif ENV['COVERAGE']
11
- require 'simplecov'
6
+ require "psych" if RUBY_VERSION >= "1.9"
12
7
 
13
- def require_do(resource, &block)
14
- require resource
15
- block.call
16
- rescue LoadError
17
- nil
18
- end
19
-
20
- formatters = [ SimpleCov::Formatter::HTMLFormatter ]
8
+ if ENV["COVERAGE"]
9
+ require "simplecov"
10
+ require "simplecov-lcov"
21
11
 
22
- require_do('simplecov-rcov') {
23
- formatters << SimpleCov::Formatter::RcovFormatter
24
- }
25
- require_do('simplecov-vim/formatter') {
26
- formatters << SimpleCov::Formatter::VimFormatter
27
- }
28
- require_do('simplecov-sublime-ruby-coverage') {
29
- formatters << SimpleCov::Formatter::SublimeRubyCoverageFormatter
30
- }
12
+ SimpleCov::Formatter::LcovFormatter.config do |config|
13
+ config.report_with_single_file = true
14
+ config.lcov_file_name = "lcov.info"
15
+ end
31
16
 
32
- SimpleCov.start do
33
- formatter SimpleCov::Formatter::MultiFormatter[*formatters]
17
+ SimpleCov.start "test_frameworks" do
18
+ enable_coverage :branch
19
+ primary_coverage :branch
20
+ formatter SimpleCov::Formatter::MultiFormatter.new([
21
+ SimpleCov::Formatter::HTMLFormatter,
22
+ SimpleCov::Formatter::LcovFormatter,
23
+ SimpleCov::Formatter::SimpleFormatter
24
+ ])
34
25
  end
35
26
  end
36
27
 
37
- file = Pathname.new(__FILE__).expand_path
38
- path = file.parent
28
+ file = Pathname.new(__FILE__).expand_path
29
+ path = file.parent
39
30
  parent = path.parent
40
31
 
41
- $:.unshift parent.join('lib')
32
+ $:.unshift parent.join("lib")
33
+
34
+ module CaptureSubprocessIO
35
+ def _synchronize
36
+ yield
37
+ end
38
+
39
+ def capture_subprocess_io
40
+ _synchronize { _capture_subprocess_io { yield } }
41
+ end
42
+
43
+ def _capture_subprocess_io
44
+ require "tempfile"
45
+
46
+ captured_stdout, captured_stderr = Tempfile.new("out"), Tempfile.new("err")
42
47
 
43
- require 'diff-lcs'
48
+ orig_stdout, orig_stderr = $stdout.dup, $stderr.dup
49
+ $stdout.reopen captured_stdout
50
+ $stderr.reopen captured_stderr
51
+
52
+ yield
53
+
54
+ $stdout.rewind
55
+ $stderr.rewind
56
+
57
+ [captured_stdout.read, captured_stderr.read]
58
+ ensure
59
+ captured_stdout.unlink
60
+ captured_stderr.unlink
61
+ $stdout.reopen orig_stdout
62
+ $stderr.reopen orig_stderr
63
+ end
64
+ private :_capture_subprocess_io
65
+ end
66
+
67
+ require "diff-lcs"
44
68
 
45
69
  module Diff::LCS::SpecHelper
46
70
  def hello
@@ -48,88 +72,109 @@ module Diff::LCS::SpecHelper
48
72
  end
49
73
 
50
74
  def hello_ary
51
- %W(h e l l o)
75
+ %w[h e l l o]
52
76
  end
53
77
 
54
78
  def seq1
55
- %w(a b c e h j l m n p)
79
+ %w[a b c e h j l m n p]
56
80
  end
57
81
 
58
82
  def skipped_seq1
59
- %w(a h n p)
83
+ %w[a h n p]
60
84
  end
61
85
 
62
86
  def seq2
63
- %w(b c d e f j k l m r s t)
87
+ %w[b c d e f j k l m r s t]
64
88
  end
65
89
 
66
90
  def skipped_seq2
67
- %w(d f k r s t)
91
+ %w[d f k r s t]
68
92
  end
69
93
 
70
94
  def word_sequence
71
- %w(abcd efgh ijkl mnopqrstuvwxyz)
95
+ %w[abcd efgh ijkl mnopqrstuvwxyz]
72
96
  end
73
97
 
74
98
  def correct_lcs
75
- %w(b c e j l m)
99
+ %w[b c e j l m]
76
100
  end
77
101
 
102
+ # standard:disable Layout/ExtraSpacing
78
103
  def correct_forward_diff
79
104
  [
80
- [ [ '-', 0, 'a' ] ],
81
- [ [ '+', 2, 'd' ] ],
82
- [ [ '-', 4, 'h' ],
83
- [ '+', 4, 'f' ] ],
84
- [ [ '+', 6, 'k' ] ],
85
- [ [ '-', 8, 'n' ],
86
- [ '-', 9, 'p' ],
87
- [ '+', 9, 'r' ],
88
- [ '+', 10, 's' ],
89
- [ '+', 11, 't' ] ]
105
+ [
106
+ ["-", 0, "a"]
107
+ ],
108
+ [
109
+ ["+", 2, "d"]
110
+ ],
111
+ [
112
+ ["-", 4, "h"],
113
+ ["+", 4, "f"]
114
+ ],
115
+ [
116
+ ["+", 6, "k"]
117
+ ],
118
+ [
119
+ ["-", 8, "n"],
120
+ ["+", 9, "r"],
121
+ ["-", 9, "p"],
122
+ ["+", 10, "s"],
123
+ ["+", 11, "t"]
124
+ ]
90
125
  ]
91
126
  end
92
127
 
93
128
  def correct_backward_diff
94
129
  [
95
- [ [ '+', 0, 'a' ] ],
96
- [ [ '-', 2, 'd' ] ],
97
- [ [ '-', 4, 'f' ],
98
- [ '+', 4, 'h' ] ],
99
- [ [ '-', 6, 'k' ] ],
100
130
  [
101
- [ '-', 9, 'r' ],
102
- [ '-', 10, 's' ],
103
- [ '+', 8, 'n' ],
104
- [ '-', 11, 't' ],
105
- [ '+', 9, 'p' ] ]
131
+ ["+", 0, "a"]
132
+ ],
133
+ [
134
+ ["-", 2, "d"]
135
+ ],
136
+ [
137
+ ["-", 4, "f"],
138
+ ["+", 4, "h"]
139
+ ],
140
+ [
141
+ ["-", 6, "k"]
142
+ ],
143
+ [
144
+ ["-", 9, "r"],
145
+ ["+", 8, "n"],
146
+ ["-", 10, "s"],
147
+ ["+", 9, "p"],
148
+ ["-", 11, "t"]
149
+ ]
106
150
  ]
107
151
  end
108
152
 
109
153
  def correct_forward_sdiff
110
154
  [
111
- [ '-', [ 0, 'a' ], [ 0, nil ] ],
112
- [ '=', [ 1, 'b' ], [ 0, 'b' ] ],
113
- [ '=', [ 2, 'c' ], [ 1, 'c' ] ],
114
- [ '+', [ 3, nil ], [ 2, 'd' ] ],
115
- [ '=', [ 3, 'e' ], [ 3, 'e' ] ],
116
- [ '!', [ 4, 'h' ], [ 4, 'f' ] ],
117
- [ '=', [ 5, 'j' ], [ 5, 'j' ] ],
118
- [ '+', [ 6, nil ], [ 6, 'k' ] ],
119
- [ '=', [ 6, 'l' ], [ 7, 'l' ] ],
120
- [ '=', [ 7, 'm' ], [ 8, 'm' ] ],
121
- [ '!', [ 8, 'n' ], [ 9, 'r' ] ],
122
- [ '!', [ 9, 'p' ], [ 10, 's' ] ],
123
- [ '+', [ 10, nil ], [ 11, 't' ] ]
155
+ ["-", [0, "a"], [0, nil]],
156
+ ["=", [1, "b"], [0, "b"]],
157
+ ["=", [2, "c"], [1, "c"]],
158
+ ["+", [3, nil], [2, "d"]],
159
+ ["=", [3, "e"], [3, "e"]],
160
+ ["!", [4, "h"], [4, "f"]],
161
+ ["=", [5, "j"], [5, "j"]],
162
+ ["+", [6, nil], [6, "k"]],
163
+ ["=", [6, "l"], [7, "l"]],
164
+ ["=", [7, "m"], [8, "m"]],
165
+ ["!", [8, "n"], [9, "r"]],
166
+ ["!", [9, "p"], [10, "s"]],
167
+ ["+", [10, nil], [11, "t"]]
124
168
  ]
125
169
  end
170
+ # standard:enable Layout/ExtraSpacing
126
171
 
127
172
  def reverse_sdiff(forward_sdiff)
128
173
  forward_sdiff.map { |line|
129
174
  line[1], line[2] = line[2], line[1]
130
175
  case line[0]
131
- when '-' then line[0] = '+'
132
- when '+' then line[0] = '-'
176
+ when "-" then line[0] = "+"
177
+ when "+" then line[0] = "-"
133
178
  end
134
179
  line
135
180
  }
@@ -144,13 +189,13 @@ module Diff::LCS::SpecHelper
144
189
  end
145
190
 
146
191
  def format_diffs(diffs)
147
- diffs.map do |e|
148
- if e.kind_of?(Array)
192
+ diffs.map { |e|
193
+ if e.is_a?(Array)
149
194
  e.map { |f| f.to_a.join }.join(", ")
150
195
  else
151
196
  e.to_a.join
152
197
  end
153
- end.join("\n")
198
+ }.join("\n")
154
199
  end
155
200
 
156
201
  def map_diffs(diffs, klass = Diff::LCS::ContextChange)
@@ -171,124 +216,134 @@ module Diff::LCS::SpecHelper
171
216
 
172
217
  def balanced_reverse(change_result)
173
218
  new_result = []
174
- change_result.each { |line|
175
- line = [ line[0], line[2], line[1] ]
219
+ change_result.each do |line|
220
+ line = [line[0], line[2], line[1]]
176
221
  case line[0]
177
- when '<'
178
- line[0] = '>'
179
- when '>'
180
- line[0] = '<'
222
+ when "<"
223
+ line[0] = ">"
224
+ when ">"
225
+ line[0] = "<"
181
226
  end
182
227
  new_result << line
183
- }
184
- new_result.sort_by { |line| [ line[1], line[2] ] }
228
+ end
229
+ new_result.sort_by { |line| [line[1], line[2]] }
185
230
  end
186
231
 
187
232
  def map_to_no_change(change_result)
188
233
  new_result = []
189
- change_result.each { |line|
234
+ change_result.each do |line|
190
235
  case line[0]
191
- when '!'
192
- new_result << [ '<', line[1], line[2] ]
193
- new_result << [ '>', line[1] + 1, line[2] ]
236
+ when "!"
237
+ new_result << ["<", line[1], line[2]]
238
+ new_result << [">", line[1] + 1, line[2]]
194
239
  else
195
240
  new_result << line
196
241
  end
197
- }
242
+ end
198
243
  new_result
199
244
  end
200
245
 
201
- def simple_callback
202
- callbacks = Object.new
203
- class << callbacks
204
- attr_reader :matched_a
205
- attr_reader :matched_b
206
- attr_reader :discards_a
207
- attr_reader :discards_b
208
- attr_reader :done_a
209
- attr_reader :done_b
210
-
211
- def reset
212
- @matched_a = []
213
- @matched_b = []
214
- @discards_a = []
215
- @discards_b = []
216
- @done_a = []
217
- @done_b = []
218
- end
246
+ class SimpleCallback
247
+ def initialize
248
+ reset
249
+ end
219
250
 
220
- def match(event)
221
- @matched_a << event.old_element
222
- @matched_b << event.new_element
223
- end
251
+ attr_reader :matched_a
252
+ attr_reader :matched_b
253
+ attr_reader :discards_a
254
+ attr_reader :discards_b
255
+ attr_reader :done_a
256
+ attr_reader :done_b
257
+
258
+ def reset
259
+ @matched_a = []
260
+ @matched_b = []
261
+ @discards_a = []
262
+ @discards_b = []
263
+ @done_a = []
264
+ @done_b = []
265
+ self
266
+ end
224
267
 
225
- def discard_b(event)
226
- @discards_b << event.new_element
227
- end
268
+ def match(event)
269
+ @matched_a << event.old_element
270
+ @matched_b << event.new_element
271
+ end
228
272
 
229
- def discard_a(event)
230
- @discards_a << event.old_element
231
- end
273
+ def discard_b(event)
274
+ @discards_b << event.new_element
275
+ end
232
276
 
233
- def finished_a(event)
234
- @done_a << [event.old_element, event.old_position,
235
- event.new_element, event.new_position]
236
- end
277
+ def discard_a(event)
278
+ @discards_a << event.old_element
279
+ end
237
280
 
238
- def finished_b(event)
239
- p "called #finished_b"
240
- @done_b << [event.old_element, event.old_position,
241
- event.new_element, event.new_position]
242
- end
281
+ def finished_a(event)
282
+ @done_a << [
283
+ event.old_element, event.old_position,
284
+ event.new_element, event.new_position
285
+ ]
286
+ end
287
+
288
+ def finished_b(event)
289
+ @done_b << [
290
+ event.old_element, event.old_position,
291
+ event.new_element, event.new_position
292
+ ]
243
293
  end
244
- callbacks.reset
245
- callbacks
294
+ end
295
+
296
+ def simple_callback
297
+ SimpleCallback.new
298
+ end
299
+
300
+ class SimpleCallbackNoFinishers < SimpleCallback
301
+ undef :finished_a
302
+ undef :finished_b
246
303
  end
247
304
 
248
305
  def simple_callback_no_finishers
249
- simple = simple_callback
250
- class << simple
251
- undef :finished_a
252
- undef :finished_b
253
- end
254
- simple
306
+ SimpleCallbackNoFinishers.new
255
307
  end
256
308
 
257
- def balanced_callback
258
- cb = Object.new
259
- class << cb
260
- attr_reader :result
309
+ class BalancedCallback
310
+ def initialize
311
+ reset
312
+ end
261
313
 
262
- def reset
263
- @result = []
264
- end
314
+ attr_reader :result
265
315
 
266
- def match(event)
267
- @result << [ "=", event.old_position, event.new_position ]
268
- end
316
+ def reset
317
+ @result = []
318
+ end
269
319
 
270
- def discard_a(event)
271
- @result << [ "<", event.old_position, event.new_position ]
272
- end
320
+ def match(event)
321
+ @result << ["=", event.old_position, event.new_position]
322
+ end
273
323
 
274
- def discard_b(event)
275
- @result << [ ">", event.old_position, event.new_position ]
276
- end
324
+ def discard_a(event)
325
+ @result << ["<", event.old_position, event.new_position]
326
+ end
277
327
 
278
- def change(event)
279
- @result << [ "!", event.old_position, event.new_position ]
280
- end
328
+ def discard_b(event)
329
+ @result << [">", event.old_position, event.new_position]
281
330
  end
282
- cb.reset
283
- cb
331
+
332
+ def change(event)
333
+ @result << ["!", event.old_position, event.new_position]
334
+ end
335
+ end
336
+
337
+ def balanced_callback
338
+ BalancedCallback.new
339
+ end
340
+
341
+ class BalancedCallbackNoChange < BalancedCallback
342
+ undef :change
284
343
  end
285
344
 
286
345
  def balanced_callback_no_change
287
- balanced = balanced_callback
288
- class << balanced
289
- undef :change
290
- end
291
- balanced
346
+ BalancedCallbackNoChange.new
292
347
  end
293
348
 
294
349
  module Matchers
@@ -302,9 +357,7 @@ module Diff::LCS::SpecHelper
302
357
 
303
358
  matcher :correctly_map_sequence do |s1|
304
359
  match do |actual|
305
- actual.each_with_index { |ee, ii|
306
- expect(ee).to be_nil_or_match_values(ii, s1, @s2)
307
- }
360
+ actual.each_index { |ii| expect(actual[ii]).to be_nil_or_match_values(ii, s1, @s2) }
308
361
  end
309
362
 
310
363
  chain :to_other_sequence do |s2|
@@ -316,6 +369,8 @@ end
316
369
 
317
370
  RSpec.configure do |conf|
318
371
  conf.include Diff::LCS::SpecHelper
319
- conf.alias_it_should_behave_like_to :it_has_behavior, 'has behavior:'
372
+ conf.alias_it_should_behave_like_to :it_has_behavior, "has behavior:"
373
+ # standard:disable Style/HashSyntax
320
374
  conf.filter_run_excluding :broken => true
375
+ # standard:enable Style/HashSyntax
321
376
  end