summaryrefslogtreecommitdiff
path: root/lib/diff/lcs.rb
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2019-01-27 00:03:42 -0500
committerAustin Ziegler <austin@zieglers.ca>2019-01-27 00:03:42 -0500
commit07ed577eba341f0ff0d7eebf4c1c2cc23083cba7 (patch)
tree25bb9d2a67dc451fb1d5256f64262d83ab0bb505 /lib/diff/lcs.rb
parent808f83a11a9e6ec45b7ef2b9c336f4b75b9d8368 (diff)
downloaddiff-lcs-07ed577eba341f0ff0d7eebf4c1c2cc23083cba7.tar.gz
Revert PR#47 "Add #to_ary to Diff::LCS::Change…"
This reverts commits 01e0cae and 3b4d2be because they introduce fatally breaking changes in the tests that were hidden by broken CI. * 01e0cae: Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChange [Akinori MUSHA] * 3b4d2be: Mention in rdoc that Diff::LCS::ContextChange can be converted to an array [Akinori MUSHA]
Diffstat (limited to 'lib/diff/lcs.rb')
-rw-r--r--lib/diff/lcs.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb
index 8fb4314..34ddf0f 100644
--- a/lib/diff/lcs.rb
+++ b/lib/diff/lcs.rb
@@ -181,20 +181,6 @@ class << Diff::LCS
# Class argument is provided for +callbacks+, #diff will attempt to
# initialise it. If the +callbacks+ object (possibly initialised) responds
# to #finish, it will be called.
- #
- # Each element of a returned array is a Diff::LCS::ContextChange object,
- # which can be implicitly converted to an array.
- #
- # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)|
- # case action
- # when '!'
- # # replace
- # when '-'
- # # delete
- # when '+'
- # # insert
- # end
- # end
def sdiff(seq1, seq2, callbacks = nil, &block) #:yields diff changes:
diff_traversal(:sdiff, seq1, seq2, callbacks || Diff::LCS::SDiffCallbacks,
&block)