Method: Diff::LCS#lcs

Defined in:
lib/gems/diff-lcs-1.1.2/lib/diff/lcs.rb

#lcs(other, &block) ⇒ Object

Returns an Array containing the longest common subsequence(s) between self and other. See Diff::LCS#LCS.

lcs = seq1.lcs(seq2)


158
159
160
# File 'lib/gems/diff-lcs-1.1.2/lib/diff/lcs.rb', line 158

def lcs(other, &block) #:yields self[ii] if there are matched subsequences:
  Diff::LCS.LCS(self, other, &block)
end