class Hashdiff::LinearCompareArray

def index_of_match_after_deletions

thereby having items removed
look ahead in the old array to see if the current item appears later
def index_of_match_after_deletions
  return unless expected_additions < 0
  (1..(expected_additions.abs)).each do |i|
    next_difference = item_difference(
      old_array[old_index + i],
      new_array[new_index],
      old_index
    )
    return old_index + i if next_difference.empty?
  end
  nil
end