diff-lcs 2.0.0.beta.2 → 2.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +173 -86
- data/CODE_OF_CONDUCT.md +155 -116
- data/CONTRIBUTING.md +29 -28
- data/CONTRIBUTORS.md +15 -11
- data/LICENCE.md +19 -38
- data/Manifest.txt +16 -3
- data/README.md +37 -26
- data/Rakefile +3 -0
- data/SECURITY.md +7 -7
- data/lib/diff/lcs/array.rb +3 -1
- data/lib/diff/lcs/callbacks.rb +1 -1
- data/lib/diff/lcs/change.rb +74 -32
- data/lib/diff/lcs/frozen_value.rb +74 -0
- data/lib/diff/lcs/hunk.rb +146 -58
- data/lib/diff/lcs/internals.rb +183 -72
- data/lib/diff/lcs/ldiff.rb +23 -45
- data/lib/diff/lcs/string.rb +3 -1
- data/lib/diff/lcs/version.rb +1 -1
- data/lib/diff/lcs.rb +29 -26
- data/licences/MIT.txt +19 -0
- data/spec/ldiff_spec.rb +9 -7
- data/test/fixtures/ldiff/output.diff.bin1-q +0 -0
- data/test/fixtures/ldiff/output.diff.bin2-q +1 -0
- data/test/fixtures/ldiff/output.diff.hunks +9 -0
- data/test/fixtures/ldiff/output.diff.hunks-c +35 -0
- data/test/fixtures/ldiff/output.diff.hunks-u +20 -0
- data/test/fixtures/ldiff/output.diff.same +0 -0
- data/test/fixtures/ldiff/output.diff.same-c +0 -0
- data/test/fixtures/ldiff/output.diff.same-u +0 -0
- data/test/fixtures/new-hunks +31 -0
- data/test/fixtures/old-hunks +30 -0
- data/test/test_change.rb +23 -19
- data/test/test_frozen_value.rb +155 -0
- data/test/test_helper.rb +5 -0
- data/test/test_hunk.rb +238 -0
- data/test/test_lcs.rb +147 -0
- data/test/test_ldiff.rb +64 -7
- metadata +28 -18
- /data/{licenses → licences}/COPYING.txt +0 -0
- /data/{licenses → licences}/artistic.txt +0 -0
- /data/{licenses → licences}/dco.txt +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0a6edbd5abc90197f8ad70ee9f9121b40d865081710ed86b24230e3b74d8674
|
|
4
|
+
data.tar.gz: 79a00e25b159809b78ad726c6fa1fb3f23d50ef2705a86b27f21d9784faeec2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7ac0c6d07f1e997c45f3e75b2d32050db6fdf4d1784707b6d0359241b70feb2c10425b4921307dadebc30b62510ee269bf651d108ec3471578bf4155196ed9e
|
|
7
|
+
data.tar.gz: '093d896631b77ce6e58b2f44d5f9b6edb060054a7c3cedf2454b081ee6f05364aa5d0173042e911b327f13b061d8602fe9b40e4675d46c230526c8c2b40fceb5'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,76 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2.
|
|
3
|
+
## 2.1.0 / 2026-11-29
|
|
4
|
+
|
|
5
|
+
There are minor **breaking change** in this release, but they are considered
|
|
6
|
+
to be unlikely to be encountered and nothing in RSpec appears to encounter
|
|
7
|
+
these issues. Because `Diff::LCS::Change` and `Diff::LCS::ContextChange` were
|
|
8
|
+
made plain frozen classes instead of `Data` instances:
|
|
9
|
+
|
|
10
|
+
- `to_s`, `pp` and `ContextChange#inspect` drop the `data` prefix;
|
|
11
|
+
- keyword names must be Symbols;
|
|
12
|
+
- a subclass overriding `initialize` with keyword parameters can no longer be
|
|
13
|
+
built positionally; and
|
|
14
|
+
- a `Marshal` or YAML dump made with 2.0.x no longer loads.
|
|
15
|
+
|
|
16
|
+
Clément Joubert contributed a number of amazing changes to this release. It
|
|
17
|
+
would not have happened without his contributions!
|
|
18
|
+
|
|
19
|
+
### Deprecations
|
|
20
|
+
|
|
21
|
+
- Deprecate the extension of Array and String by requiring `diff/lcs/array` or
|
|
22
|
+
`diff/lcs/string`. These files will go away with the next major version. As
|
|
23
|
+
of this version, a warning will be emitted. (This should have happened for
|
|
24
|
+
2.0, but I forgot.)
|
|
25
|
+
|
|
26
|
+
### Correctness
|
|
27
|
+
|
|
28
|
+
- Added a guard test suite showing that Unicode NFC and NFD forms compare
|
|
29
|
+
differently. [#234][pull-234]
|
|
30
|
+
|
|
31
|
+
- Clarified the licence for diff-lcs, based on [#221][pull-221] by James
|
|
32
|
+
Thompson. [#231][pull-231]
|
|
33
|
+
|
|
34
|
+
### `ldiff` Improvements
|
|
35
|
+
|
|
36
|
+
All of these changes were made by Clément Joubert.
|
|
37
|
+
|
|
38
|
+
- The hunk merging and output of `Diff::LCS::Ldiff` was moved to
|
|
39
|
+
`Diff::LCS::Hunk`, so that it can be used without `bin/ldiff`.
|
|
40
|
+
`Diff::LCS::Hunk.from_diff` returns the merged hunks for two sequences of
|
|
41
|
+
lines and `Diff::LCS::Hunk.diff` returns the diff in the old, unified, or
|
|
42
|
+
context format, with 3 lines of context by default.
|
|
43
|
+
`Diff::LCS::Hunk#diff(:old)` now writes each change of a hunk on its own, so
|
|
44
|
+
it is also correct for hunks with context. `ldiff` output is unchanged.
|
|
45
|
+
[#46][issue-46], [#242][pull-242]
|
|
46
|
+
|
|
47
|
+
- The `ldiff -c` output was fixed when there is more than one hunk. When a
|
|
48
|
+
hunk ended with lines from the new file, the separator of the next hunk was
|
|
49
|
+
written on the same line as the last line. [#241][pull-241]
|
|
50
|
+
|
|
51
|
+
- `Diff::LCS::Ldiff.run` read the filenames the file names from `ARGV` instead
|
|
52
|
+
of its `args`, and `-` from `$stdin` instead of its `input`. This is fixed,
|
|
53
|
+
so it can be called with any array and input. [#236][issue-236]
|
|
54
|
+
|
|
55
|
+
- `ldiff -q` incorrectly reported two identical binary files as different.
|
|
56
|
+
[#237][issue-237]
|
|
57
|
+
|
|
58
|
+
### Performance Improvements
|
|
59
|
+
|
|
60
|
+
All of these changes were made by Clément Joubert.
|
|
61
|
+
|
|
62
|
+
- Sped up and reduced allocations in `diff`, `sdiff` and `lcs` without
|
|
63
|
+
affecting output. The LCS core skips redundant threshold updates and the
|
|
64
|
+
links they allocated, and strings are split into code points once instead of
|
|
65
|
+
allocating on every access. `diff` and `sdiff` build their default results
|
|
66
|
+
without traversal events. [#230][pull-230]
|
|
67
|
+
|
|
68
|
+
- `Diff::LCS::Change` and `Diff::LCS::ContextChange` were made plain frozen
|
|
69
|
+
classes with the API they had as `Data` classes, so building one allocates a
|
|
70
|
+
single object: on line diffs with YJIT, `sdiff` runs more than twice as fast
|
|
71
|
+
and `traverse_balanced` 1.7 times as fast. [#235][pull-235]
|
|
72
|
+
|
|
73
|
+
## 2.0.0 / 2026-02-01
|
|
4
74
|
|
|
5
75
|
This release has significant **breaking changes**.
|
|
6
76
|
|
|
@@ -8,8 +78,8 @@ This release has significant **breaking changes**.
|
|
|
8
78
|
|
|
9
79
|
- readability improvements (endless methods, pattern matching);
|
|
10
80
|
|
|
11
|
-
- support for immutable Data classes (`Diff::LCS::Block`,
|
|
12
|
-
and `Diff::LCS::ContextChange`);
|
|
81
|
+
- support for immutable Data classes (`Diff::LCS::Block`,
|
|
82
|
+
`Diff::LCS::Change`, and `Diff::LCS::ContextChange`);
|
|
13
83
|
|
|
14
84
|
- removal of compatibility shims;
|
|
15
85
|
|
|
@@ -27,9 +97,9 @@ This release has significant **breaking changes**.
|
|
|
27
97
|
- The `htmldiff` binary and supporting code have been removed without
|
|
28
98
|
replacement.
|
|
29
99
|
|
|
30
|
-
- `ldiff` no longer supports `ed`-script output (`ed` and `reverse_ed`
|
|
31
|
-
As Baptiste Courtois says in [#108][pull-108], the "implementation
|
|
32
|
-
for a while and no-one reported it."
|
|
100
|
+
- `ldiff` no longer supports `ed`-script output (`ed` and `reverse_ed`
|
|
101
|
+
formats). As Baptiste Courtois says in [#108][pull-108], the "implementation
|
|
102
|
+
was broken for a while and no-one reported it."
|
|
33
103
|
|
|
34
104
|
- The method `Diff::LCS.LCS` has been removed as an alias for `Diff::LCS.lcs`.
|
|
35
105
|
Most callers are using `Diff::LCS.lcs` and modern Ruby did-you-mean support
|
|
@@ -38,8 +108,8 @@ This release has significant **breaking changes**.
|
|
|
38
108
|
- `Diff::LCS::Change` objects implemented the comparison operator (`<=>`)
|
|
39
109
|
incorrectly. Comparisons are now done so that the `position` is compared
|
|
40
110
|
first, then the `action` (by index of `VALID_ACTIONS`), and finally the
|
|
41
|
-
element. `Diff::LCS::ContextChange` works similarly, comparing the old and
|
|
42
|
-
positions prior to comparing the actions by index.
|
|
111
|
+
element. `Diff::LCS::ContextChange` works similarly, comparing the old and
|
|
112
|
+
new positions prior to comparing the actions by index.
|
|
43
113
|
|
|
44
114
|
The order of `VALID_ACTIONS` was changed for the index order to make sense.
|
|
45
115
|
|
|
@@ -56,6 +126,8 @@ This release has significant **breaking changes**.
|
|
|
56
126
|
(`rake integration`) were written with the assistance of [Kiro][kiro] and
|
|
57
127
|
verified manually, with portions changed as required.
|
|
58
128
|
|
|
129
|
+
- The code of conduct was updated to the Contributor Covenant 3.0.
|
|
130
|
+
|
|
59
131
|
## 1.6.2 / 2025-05-12
|
|
60
132
|
|
|
61
133
|
- Handle upcoming changes to the `cgi` gem in Ruby 3.5 ([#147][pull-147])
|
|
@@ -89,14 +161,14 @@ This release has significant **breaking changes**.
|
|
|
89
161
|
code extraction making it easier to use separately from the `bin/ldiff`
|
|
90
162
|
command in [#103][pull-103]. This partially resolves [#46][issue-46].
|
|
91
163
|
|
|
92
|
-
- Improvement of binary and empty file detection and tests in
|
|
93
|
-
and [#105][pull-105]. This resolves issues
|
|
94
|
-
[#102][issue-102].
|
|
164
|
+
- Improvement of binary and empty file detection and tests in
|
|
165
|
+
[#104][pull-104] and [#105][pull-105]. This resolves issues
|
|
166
|
+
[#100][issue-100], [#102][issue-102].
|
|
95
167
|
|
|
96
168
|
- Various ldiff fixes for output [#101][pull-101] resolves issues
|
|
97
|
-
[#106][issue-106] (ldiff ed scripts are inverted), [#107][issue-107]
|
|
98
|
-
hunk ranges are incorrect; regression or incorrect fix for
|
|
99
|
-
and [#95][issue-95].
|
|
169
|
+
[#106][issue-106] (ldiff ed scripts are inverted), [#107][issue-107]
|
|
170
|
+
(ldiff hunk ranges are incorrect; regression or incorrect fix for
|
|
171
|
+
[#60][issue-60]), and [#95][issue-95].
|
|
100
172
|
|
|
101
173
|
- Patrick Linnane fixed various minor typos. [#93][pull-93]
|
|
102
174
|
|
|
@@ -110,13 +182,14 @@ This release has significant **breaking changes**.
|
|
|
110
182
|
|
|
111
183
|
Changes described here are effective 2024-12-31.
|
|
112
184
|
|
|
113
|
-
- Update gem management details to use markdown files for everything,
|
|
114
|
-
in part by [flavorjones/hoe-markdown][hoe-markdown]. Several files
|
|
115
|
-
renamed to be more consistent with standard practices.
|
|
185
|
+
- Update gem management details to use markdown files for everything,
|
|
186
|
+
enabled in part by [flavorjones/hoe-markdown][hoe-markdown]. Several files
|
|
187
|
+
were renamed to be more consistent with standard practices.
|
|
116
188
|
|
|
117
|
-
- Updated security notes with an [age][age] public key rather than pointing
|
|
118
|
-
Keybase.io and a PGP public key which I no longer use. The use of the
|
|
119
|
-
[Tidelift security contact][tidelift] is recommended over direct
|
|
189
|
+
- Updated security notes with an [age][age] public key rather than pointing
|
|
190
|
+
to Keybase.io and a PGP public key which I no longer use. The use of the
|
|
191
|
+
[Tidelift security contact][tidelift] is recommended over direct
|
|
192
|
+
disclosure.
|
|
120
193
|
|
|
121
194
|
## 1.5.1 / 2024-01-31
|
|
122
195
|
|
|
@@ -127,8 +200,8 @@ This release has significant **breaking changes**.
|
|
|
127
200
|
|
|
128
201
|
- Justin Steele converted the licence file to Markdown. [#84][pull-84]
|
|
129
202
|
|
|
130
|
-
- Updated the gem SPDX identifier for GPL 2.0 or later, resolving
|
|
131
|
-
by
|
|
203
|
+
- Updated the gem SPDX identifier for GPL 2.0 or later, resolving
|
|
204
|
+
[#86][pull-86] by Vít Ondruch.
|
|
132
205
|
|
|
133
206
|
- Resolve a potential security issue with `ldiff` in its use of `IO.read`
|
|
134
207
|
instead of `File.read`. [#91][issue-91]
|
|
@@ -156,11 +229,11 @@ This release has significant **breaking changes**.
|
|
|
156
229
|
results would result in equivalent changes that could be played forward or
|
|
157
230
|
backward as appropriate. [#71][pull-71], [#75][pull-75]
|
|
158
231
|
|
|
159
|
-
- The above fix resulted in a changed order of the longest common
|
|
160
|
-
when callbacks were applied. After analysis, it was determined
|
|
161
|
-
computed subsequence was _equivalent_ to the prior version, so
|
|
162
|
-
updated. This also resulted in the clarification of
|
|
163
|
-
traversing the sub-sequences. [#79][pull-79]
|
|
232
|
+
- The above fix resulted in a changed order of the longest common
|
|
233
|
+
subsequence when callbacks were applied. After analysis, it was determined
|
|
234
|
+
that the computed subsequence was _equivalent_ to the prior version, so
|
|
235
|
+
the test was updated. This also resulted in the clarification of
|
|
236
|
+
documentation when traversing the sub-sequences. [#79][pull-79]
|
|
164
237
|
|
|
165
238
|
- An infinite loop case in the case where `Diff::LCS` would be included into
|
|
166
239
|
an enumerable class has been fixed. [#73][pull-73]
|
|
@@ -168,15 +241,15 @@ This release has significant **breaking changes**.
|
|
|
168
241
|
- Clarified the purpose of a threshold test in calculation of LCS.
|
|
169
242
|
[#72][pull-72], [#80][pull-80]
|
|
170
243
|
|
|
171
|
-
- Removed autotest directory
|
|
244
|
+
- Removed `autotest` directory
|
|
172
245
|
|
|
173
246
|
## 1.4.4 / 2020-07-01
|
|
174
247
|
|
|
175
248
|
- Fixed an issue reported by Jun Aruga in the `Diff::LCS::Ldiff` binary text
|
|
176
249
|
detection. [#44][issue-44]
|
|
177
250
|
|
|
178
|
-
- Fixed a theoretical issue reported by Jun Aruga in `Diff::LCS::Hunk` to
|
|
179
|
-
a more useful exception. [#43][issue-43]
|
|
251
|
+
- Fixed a theoretical issue reported by Jun Aruga in `Diff::LCS::Hunk` to
|
|
252
|
+
raise a more useful exception. [#43][issue-43]
|
|
180
253
|
|
|
181
254
|
- Added documentation that should address custom object issues as reported in
|
|
182
255
|
[#35][issue-35].
|
|
@@ -199,16 +272,16 @@ This release has significant **breaking changes**.
|
|
|
199
272
|
- `old`, `ed`, and `reverse_ed` formats have no differences.
|
|
200
273
|
|
|
201
274
|
- `unified` format will report `` given the
|
|
202
|
-
correct conditions, at most once. Unified range reporting also differs
|
|
203
|
-
the last hunk such that the `length` of the range is reduced by one.
|
|
275
|
+
correct conditions, at most once. Unified range reporting also differs
|
|
276
|
+
for the last hunk such that the `length` of the range is reduced by one.
|
|
204
277
|
|
|
205
278
|
- `context` format will report `\No newline at end of file` given the
|
|
206
279
|
correct conditions, up to once per "file". Context range reporting also
|
|
207
|
-
differs for the last hunk such that the `end` part of the range is
|
|
208
|
-
by one to a minimum of one.
|
|
280
|
+
differs for the last hunk such that the `end` part of the range is
|
|
281
|
+
reduced by one to a minimum of one.
|
|
209
282
|
|
|
210
|
-
- Added a bunch more tests for the cases above, and fixed `hunk_spec.rb` so
|
|
211
|
-
the phrase being compared isn't nonsense French.
|
|
283
|
+
- Added a bunch more tests for the cases above, and fixed `hunk_spec.rb` so
|
|
284
|
+
that the phrase being compared isn't nonsense French.
|
|
212
285
|
|
|
213
286
|
- Updated formatting.
|
|
214
287
|
|
|
@@ -217,15 +290,15 @@ This release has significant **breaking changes**.
|
|
|
217
290
|
## 1.4.3 / 2020-06-29
|
|
218
291
|
|
|
219
292
|
- Fixed several issues with 1.4 on Rubies older than 2.0. Some of this was
|
|
220
|
-
providing useful shim functions to Hoe 3.x (which dropped these older Rubies
|
|
221
|
-
while ago). Specifically:
|
|
293
|
+
providing useful shim functions to Hoe 3.x (which dropped these older Rubies
|
|
294
|
+
a while ago). Specifically:
|
|
222
295
|
|
|
223
296
|
- Removed Array#lazy from a method in `Diff::LCS::Hunk`.
|
|
224
297
|
|
|
225
298
|
- Changed some unit tests to use old-style Symbol-keyed hashes.
|
|
226
299
|
|
|
227
|
-
- Changed some unit test helper functions to no longer use keyword
|
|
228
|
-
but only a trailing options hash.
|
|
300
|
+
- Changed some unit test helper functions to no longer use keyword
|
|
301
|
+
parameters, but only a trailing options hash.
|
|
229
302
|
|
|
230
303
|
- Made the use of `psych` dependent on `RUBY_VERSION >= 1.9`.
|
|
231
304
|
|
|
@@ -233,7 +306,8 @@ This release has significant **breaking changes**.
|
|
|
233
306
|
|
|
234
307
|
## 1.4.2 / 2020-06-23
|
|
235
308
|
|
|
236
|
-
- Camille Drapier fixed a small issue with RuboCop configuration.
|
|
309
|
+
- Camille Drapier fixed a small issue with RuboCop configuration.
|
|
310
|
+
[#59][pull-59]
|
|
237
311
|
|
|
238
312
|
- Applied another fix (and unit test) to fix an issue for the Chef team.
|
|
239
313
|
[#60][issue-60], [#61][pull-61]
|
|
@@ -248,17 +322,18 @@ This release has significant **breaking changes**.
|
|
|
248
322
|
- Ruby versions lower than 2.4 are soft-deprecated and will not be run as part
|
|
249
323
|
of the CI process any longer.
|
|
250
324
|
|
|
251
|
-
- Akinora
|
|
252
|
-
implicitly treated arrays. Originally provided as pull request
|
|
253
|
-
but it introduced a number of test failures as documented in
|
|
254
|
-
and remediation of `Diff::LCS` itself was introduced in
|
|
325
|
+
- Akinora Musha (@knu) added the ability for `Diff::LCS::Change` objects to be
|
|
326
|
+
implicitly treated arrays. Originally provided as pull request
|
|
327
|
+
[#47][pull-47], but it introduced a number of test failures as documented in
|
|
328
|
+
[#48][issue-48], and remediation of `Diff::LCS` itself was introduced in
|
|
329
|
+
[#49][pull-49].
|
|
255
330
|
|
|
256
331
|
- Resolved [#5][issue-05] with some tests comparing output from `system` calls
|
|
257
332
|
to `bin/ldiff` with some pre-generated output. Resolved [#6][issue-06] with
|
|
258
333
|
these tests.
|
|
259
334
|
|
|
260
|
-
- Resolved a previously undetected `bin/ldiff` issue with `--context` output
|
|
261
|
-
matching `diff --context` output.
|
|
335
|
+
- Resolved a previously undetected `bin/ldiff` issue with `--context` output
|
|
336
|
+
not matching `diff --context` output.
|
|
262
337
|
|
|
263
338
|
- Resolved an issue with later versions of Ruby not working with an `OptParse`
|
|
264
339
|
specification of `Numeric`; this has been changed to `Integer`.
|
|
@@ -280,8 +355,8 @@ This release has significant **breaking changes**.
|
|
|
280
355
|
- Fix tab expansion in `htmldiff`, provided by Mark Friedgan in pull request
|
|
281
356
|
[#25][pull-25].
|
|
282
357
|
|
|
283
|
-
- Silence Ruby 2.4 `Fixnum` deprecation warnings. Fixes issue
|
|
284
|
-
and pull request [#36][pull-36].
|
|
358
|
+
- Silence Ruby 2.4 `Fixnum` deprecation warnings. Fixes issue
|
|
359
|
+
[#38][issue-38] and pull request [#36][pull-36].
|
|
285
360
|
|
|
286
361
|
- Ensure that test dependencies are loaded properly. Fixes issue
|
|
287
362
|
[#33][issue-33] and pull request [#34][pull-34].
|
|
@@ -307,15 +382,15 @@ This release has significant **breaking changes**.
|
|
|
307
382
|
|
|
308
383
|
- Bugs fixed:
|
|
309
384
|
|
|
310
|
-
- Comparing arrays flattened them too far, especially with
|
|
311
|
-
Fixed by Josh Bronson in pull request [#23][pull-23].
|
|
385
|
+
- Comparing arrays flattened them too far, especially with
|
|
386
|
+
`Diff::LCS.sdiff`. Fixed by Josh Bronson in pull request [#23][pull-23].
|
|
312
387
|
|
|
313
388
|
## 1.2.4 / 2013-04-20
|
|
314
389
|
|
|
315
390
|
- Bugs fixed:
|
|
316
391
|
|
|
317
|
-
- A bug was introduced after 1.1.3 when pruning common sequences at the
|
|
318
|
-
of comparison. Paul Kunysch (@pck) fixed this in pull request
|
|
392
|
+
- A bug was introduced after 1.1.3 when pruning common sequences at the
|
|
393
|
+
start of comparison. Paul Kunysch (@pck) fixed this in pull request
|
|
319
394
|
[#18][pull-18]. Thanks!
|
|
320
395
|
|
|
321
396
|
- The Rubinius (1.9 mode) bug in [rubinius/rubinius#2268][rubinius#2268] has
|
|
@@ -346,13 +421,13 @@ This release has significant **breaking changes**.
|
|
|
346
421
|
- Bugs Fixed:
|
|
347
422
|
|
|
348
423
|
- `Diff::LCS::Hunk` could not properly generate a difference for comparison
|
|
349
|
-
sets that are not US-ASCII-compatible because of the use of literal
|
|
350
|
-
expressions and strings. Jon Rowe found this in
|
|
351
|
-
[rspec/rspec-expectations#219][rspec-expectations#219] and provided a
|
|
352
|
-
pass implementation in pull request [#15][pull-15]. I've reworked it
|
|
353
|
-
of test failures in Rubinius when running in Ruby 1.9 mode. This
|
|
354
|
-
added values to the encoding of the old dataset (as determined
|
|
355
|
-
piece of the old dataset).
|
|
424
|
+
sets that are not US-ASCII-compatible because of the use of literal
|
|
425
|
+
regular expressions and strings. Jon Rowe found this in
|
|
426
|
+
[rspec/rspec-expectations#219][rspec-expectations#219] and provided a
|
|
427
|
+
first pass implementation in pull request [#15][pull-15]. I've reworked it
|
|
428
|
+
because of test failures in Rubinius when running in Ruby 1.9 mode. This
|
|
429
|
+
coerces the added values to the encoding of the old dataset (as determined
|
|
430
|
+
by the first piece of the old dataset).
|
|
356
431
|
|
|
357
432
|
- Adding Travis CI testing for Ruby 2.0.
|
|
358
433
|
|
|
@@ -364,17 +439,18 @@ This release has significant **breaking changes**.
|
|
|
364
439
|
release of `Diff::LCS` 1.2 introduced an unnecessary public API change to
|
|
365
440
|
`Diff::LCS::Hunk` (see the change at
|
|
366
441
|
[rspec/rspec-expectations@3d6fc82c][rspec-expectations@3d6fc82c] for
|
|
367
|
-
details). The new method name (and behaviour) is more correct, but I
|
|
368
|
-
not have renamed the function or should have at least provided an
|
|
369
|
-
This release restores `Diff::LCS::Hunk#unshift` as an alias to
|
|
370
|
-
that the old `#unshift` behaviour was incorrect and will not
|
|
442
|
+
details). The new method name (and behaviour) is more correct, but I
|
|
443
|
+
should not have renamed the function or should have at least provided an
|
|
444
|
+
alias. This release restores `Diff::LCS::Hunk#unshift` as an alias to
|
|
445
|
+
#merge. Note that the old `#unshift` behaviour was incorrect and will not
|
|
446
|
+
be restored.
|
|
371
447
|
|
|
372
448
|
## 1.2.0 / 2013-01-21
|
|
373
449
|
|
|
374
450
|
- Minor Enhancements:
|
|
375
451
|
|
|
376
|
-
- Added special case handling for `Diff::LCS.patch` so that it handles
|
|
377
|
-
that are empty or contain no changes.
|
|
452
|
+
- Added special case handling for `Diff::LCS.patch` so that it handles
|
|
453
|
+
patches that are empty or contain no changes.
|
|
378
454
|
|
|
379
455
|
- Added two new methods (`#patch_me` and `#unpatch_me`) to the include-able
|
|
380
456
|
module.
|
|
@@ -383,23 +459,24 @@ This release has significant **breaking changes**.
|
|
|
383
459
|
|
|
384
460
|
- Fixed issue [#1][issue-01] patch direction detection.
|
|
385
461
|
|
|
386
|
-
- Resolved issue [#2][issue-02] by handling `string[string.size, 1]`
|
|
387
|
-
(it returns `""` not `nil`).
|
|
462
|
+
- Resolved issue [#2][issue-02] by handling `string[string.size, 1]`
|
|
463
|
+
properly (it returns `""` not `nil`).
|
|
388
464
|
|
|
389
|
-
- Michael Granger (ged) fixed an implementation error in
|
|
390
|
-
and added specs in pull request [#8][pull-08]. Thanks!
|
|
465
|
+
- Michael Granger (@ged) fixed an implementation error in
|
|
466
|
+
`Diff::LCS::Change` and added specs in pull request [#8][pull-08]. Thanks!
|
|
391
467
|
|
|
392
468
|
- Made the code auto-testable.
|
|
393
469
|
|
|
394
|
-
- Vít Ondruch (voxik) provided the latest version of the GPL2 license file
|
|
395
|
-
pull request [#10][pull-10]. Thanks!
|
|
470
|
+
- Vít Ondruch (@voxik) provided the latest version of the GPL2 license file
|
|
471
|
+
in pull request [#10][pull-10]. Thanks!
|
|
396
472
|
|
|
397
|
-
- Fixed a documentation issue with the include-able versions of `#patch!`
|
|
398
|
-
`#unpatch!` where they implied that they would replace the original
|
|
399
|
-
Given that `Diff::LCS.patch` always returns a copy, the
|
|
400
|
-
incorrect and has been corrected. To provide the
|
|
401
|
-
originally documented, two new methods were added to
|
|
402
|
-
Found by scooter-dangle in issue [#12][issue-12].
|
|
473
|
+
- Fixed a documentation issue with the include-able versions of `#patch!`
|
|
474
|
+
and `#unpatch!` where they implied that they would replace the original
|
|
475
|
+
value. Given that `Diff::LCS.patch` always returns a copy, the
|
|
476
|
+
documentation was incorrect and has been corrected. To provide the
|
|
477
|
+
behaviour that was originally documented, two new methods were added to
|
|
478
|
+
provide this behaviour. Found by scooter-dangle in issue [#12][issue-12].
|
|
479
|
+
Thanks!
|
|
403
480
|
|
|
404
481
|
- Code Style Changes:
|
|
405
482
|
|
|
@@ -446,8 +523,8 @@ This release has significant **breaking changes**.
|
|
|
446
523
|
contain last equal part).
|
|
447
524
|
|
|
448
525
|
- Fixed a problem with callback initialisation code (it assumed that all
|
|
449
|
-
callbacks passed as classes can be initialised; now, it rescues
|
|
450
|
-
in the event of private :new being called).
|
|
526
|
+
callbacks passed as classes can be initialised; now, it rescues
|
|
527
|
+
NoMethodError in the event of private :new being called).
|
|
451
528
|
|
|
452
529
|
- Modified the non-initialisable callbacks to have a private `#new` method.
|
|
453
530
|
|
|
@@ -459,8 +536,8 @@ This release has significant **breaking changes**.
|
|
|
459
536
|
|
|
460
537
|
- Added a contextual diff callback, `Diff::LCS::ContextDiffCallback`.
|
|
461
538
|
|
|
462
|
-
- Implemented (un-)patching for standard diff callback output formats with
|
|
463
|
-
`#diff` and `#sdiff`.
|
|
539
|
+
- Implemented (un-)patching for standard diff callback output formats with
|
|
540
|
+
both `#diff` and `#sdiff`.
|
|
464
541
|
|
|
465
542
|
- Extensive documentation changes.
|
|
466
543
|
|
|
@@ -469,13 +546,13 @@ This release has significant **breaking changes**.
|
|
|
469
546
|
- Fixed a problem with `bin/ldiff` output, especially for unified format.
|
|
470
547
|
Newlines that should have been present weren't.
|
|
471
548
|
|
|
472
|
-
- Changed the `.tar.gz` installer to generate Windows batch files if ones do
|
|
473
|
-
exist already. Removed the existing batch files as they didn't work.
|
|
549
|
+
- Changed the `.tar.gz` installer to generate Windows batch files if ones do
|
|
550
|
+
not exist already. Removed the existing batch files as they didn't work.
|
|
474
551
|
|
|
475
552
|
## 1.0.3
|
|
476
553
|
|
|
477
|
-
- Fixed a problem with `#traverse_sequences` where the first difference from
|
|
478
|
-
left sequence might not be appropriately captured.
|
|
554
|
+
- Fixed a problem with `#traverse_sequences` where the first difference from
|
|
555
|
+
the left sequence might not be appropriately captured.
|
|
479
556
|
|
|
480
557
|
## 1.0.2
|
|
481
558
|
|
|
@@ -526,6 +603,8 @@ This release has significant **breaking changes**.
|
|
|
526
603
|
[issue-102]: https://github.com/halostatue/diff-lcs/issues/102
|
|
527
604
|
[issue-106]: https://github.com/halostatue/diff-lcs/issues/106
|
|
528
605
|
[issue-107]: https://github.com/halostatue/diff-lcs/issues/107
|
|
606
|
+
[issue-236]: https://github.com/halostatue/diff-lcs/issues/236
|
|
607
|
+
[issue-237]: https://github.com/halostatue/diff-lcs/issues/237
|
|
529
608
|
[pull-08]: https://github.com/halostatue/diff-lcs/pull/8
|
|
530
609
|
[pull-09]: https://github.com/halostatue/diff-lcs/pull/9
|
|
531
610
|
[pull-10]: https://github.com/halostatue/diff-lcs/pull/10
|
|
@@ -565,6 +644,13 @@ This release has significant **breaking changes**.
|
|
|
565
644
|
[pull-129]: https://github.com/halostatue/diff-lcs/pull/129
|
|
566
645
|
[pull-147]: https://github.com/halostatue/diff-lcs/pull/147
|
|
567
646
|
[pull-148]: https://github.com/halostatue/diff-lcs/pull/148
|
|
647
|
+
[pull-221]: https://github.com/halostatue/diff-lcs/pull/221
|
|
648
|
+
[pull-230]: https://github.com/halostatue/diff-lcs/pull/230
|
|
649
|
+
[pull-231]: https://github.com/halostatue/diff-lcs/pull/231
|
|
650
|
+
[pull-234]: https://github.com/halostatue/diff-lcs/pull/234
|
|
651
|
+
[pull-235]: https://github.com/halostatue/diff-lcs/pull/235
|
|
652
|
+
[pull-241]: https://github.com/halostatue/diff-lcs/pull/241
|
|
653
|
+
[pull-242]: https://github.com/halostatue/diff-lcs/pull/242
|
|
568
654
|
[rspec-expectations#200]: https://github.com/rspec/rspec-expectations/pull/200
|
|
569
655
|
[rspec-expectations#219]: https://github.com/rspec/rspec-expectations/issues/219
|
|
570
656
|
[rspec-expectations#238]: https://github.com/rspec/rspec-expectations/issues/238
|
|
@@ -576,4 +662,5 @@ This release has significant **breaking changes**.
|
|
|
576
662
|
[tp]: https://guides.rubygems.org/trusted-publishing/
|
|
577
663
|
[kiro]: https://kiro.dev
|
|
578
664
|
[gh-user-annih]: https://github.com/annih
|
|
665
|
+
[gh-user-czj]: https://github.com/czj
|
|
579
666
|
[gh-issue-891]: https://github.com/halostatue/diff-lcs/issues/891
|