module Diff::LCS

def self.callbacks_for(callbacks)

def self.callbacks_for(callbacks)
  callbacks.new
rescue
  callbacks
end

def diff(other, callbacks = nil, &block)

Returns the difference set between +self+ and +other+. See Diff::LCS#diff.
def diff(other, callbacks = nil, &block)
  Diff::LCS.diff(self, other, callbacks, &block)
end

def lcs(other, &block) # :yields: self[i] if there are matched subsequences

:yields: self[i] if there are matched subsequences
O.new('a').hash == O.new('a').hash
O.new('a').eql?(O.new('a')) == true &&

compare identically for key purposes. That is:
the methods +#hash+ and +#eql?+ such that two objects containing identical values
can be used as a key in a Hash. This means that those objects must implement
A note when using objects: Diff::LCS only works properly when each object

lcs = seq1.lcs(seq2)

+self+ and +other+. See Diff::LCS#lcs.
Returns an Array containing the longest common subsequence(s) between
def lcs(other, &block) # :yields: self[i] if there are matched subsequences
  Diff::LCS.lcs(self, other, &block)
end

def patch(patchset)

to autodiscover the direction of the patch.
on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts
Attempts to patch +self+ with the provided +patchset+. A new sequence based
def patch(patchset)
  Diff::LCS.patch(self, patchset)
end

def patch!(patchset)

patch direction autodiscovery.
on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no
Attempts to patch +self+ with the provided +patchset+. A new sequence based
def patch!(patchset)
  Diff::LCS.patch!(self, patchset)
end

def patch_me(patchset)

replaced. See Diff::LCS#patch. Does no patch direction autodiscovery.
the sequence this is used on supports #replace, the value of +self+ will be
Attempts to patch +self+ with the provided +patchset+, using #patch!. If
def patch_me(patchset)
  if respond_to? :replace
    replace(patch!(patchset))
  else
    patch!(patchset)
  end
end

def sdiff(other, callbacks = nil, &block)

+other+. See Diff::LCS#sdiff.
Returns the balanced ("side-by-side") difference set between +self+ and
def sdiff(other, callbacks = nil, &block)
  Diff::LCS.sdiff(self, other, callbacks, &block)
end

def traverse_balanced(other, callbacks = nil, &block)

Diff::LCS#traverse_balanced.
+other+ using the alternate, balanced algorithm. See
Traverses the discovered longest common subsequences between +self+ and
def traverse_balanced(other, callbacks = nil, &block)
  Diff::LCS.traverse_balanced(self, other, callbacks || Diff::LCS::BalancedCallbacks, &block)
end

def traverse_sequences(other, callbacks = nil, &block)

+other+. See Diff::LCS#traverse_sequences.
Traverses the discovered longest common subsequences between +self+ and
def traverse_sequences(other, callbacks = nil, &block)
  Diff::LCS.traverse_sequences(self, other, callbacks || Diff::LCS::SequenceCallbacks, &block)
end

def unpatch!(patchset)

Does no patch direction autodiscovery.
based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch.
Attempts to unpatch +self+ with the provided +patchset+. A new sequence
def unpatch!(patchset)
  Diff::LCS.unpatch!(self, patchset)
end

def unpatch_me(patchset)

be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery.
If the sequence this is used on supports #replace, the value of +self+ will
Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!.
def unpatch_me(patchset)
  if respond_to? :replace
    replace(unpatch!(patchset))
  else
    unpatch!(patchset)
  end
end