summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/diff/lcs.rb14
-rw-r--r--lib/diff/lcs/change.rb4
2 files changed, 0 insertions, 18 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)
diff --git a/lib/diff/lcs/change.rb b/lib/diff/lcs/change.rb
index 8dae83b..9229069 100644
--- a/lib/diff/lcs/change.rb
+++ b/lib/diff/lcs/change.rb
@@ -41,8 +41,6 @@ class Diff::LCS::Change
[ @action, @position, @element ]
end
- alias to_ary to_a
-
def self.from_a(arr)
arr = arr.flatten(1)
case arr.size
@@ -134,8 +132,6 @@ class Diff::LCS::ContextChange < Diff::LCS::Change
]
end
- alias to_ary to_a
-
def inspect(*args)
to_a.inspect
end