diff options
author | Austin Ziegler <austin@zieglers.ca> | 2019-01-31 11:23:22 -0500 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2019-01-31 11:23:22 -0500 |
commit | 97eed62dea0f59cd13cf5b2e91c30b461a28d8f0 (patch) | |
tree | a2f4442c21e211357b8340ee5e469c66f60ac61c | |
parent | efafb8cc423a2879e622aeb6588f91c9bc62f584 (diff) | |
download | diff-lcs-flatten-clean-up.tar.gz |
Update documentationflatten-clean-up
-rw-r--r-- | lib/diff/lcs.rb | 2 | ||||
-rw-r--r-- | lib/diff/lcs/callbacks.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb index f33a452..773b4db 100644 --- a/lib/diff/lcs.rb +++ b/lib/diff/lcs.rb @@ -602,7 +602,7 @@ class << Diff::LCS # having no changes if the following predicate returns true: # # patchset.empty? or - # patchset.flatten.all? { |change| change.unchanged? } + # patchset.flatten(1).all? { |change| change.unchanged? } # # === Patchsets # diff --git a/lib/diff/lcs/callbacks.rb b/lib/diff/lcs/callbacks.rb index 93c860d..2a7665b 100644 --- a/lib/diff/lcs/callbacks.rb +++ b/lib/diff/lcs/callbacks.rb @@ -193,7 +193,7 @@ end # Diff::LCS::SDiffCallbacks. They may be compared as: # # s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } -# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) # # s == c # -> true # @@ -273,7 +273,7 @@ end # Diff::LCS::ContextDiffCallbacks. They may be compared as: # # s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } -# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) # # s == c # -> true # |