summaryrefslogtreecommitdiff
path: root/lib/diff/lcs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diff/lcs.rb')
-rw-r--r--lib/diff/lcs.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb
index f102bb1..f3716e1 100644
--- a/lib/diff/lcs.rb
+++ b/lib/diff/lcs.rb
@@ -377,14 +377,14 @@ class << Diff::LCS
ai += 1
end
- next unless bj < b_size
-
- ax = string ? seq1[ai, 1] : seq1[ai]
- bx = string ? seq2[bj, 1] : seq2[bj]
- event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
- event = yield event if block_given?
- callbacks.discard_b(event)
- bj += 1
+ if bj < b_size
+ ax = string ? seq1[ai, 1] : seq1[ai]
+ bx = string ? seq2[bj, 1] : seq2[bj]
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
+ event = yield event if block_given?
+ callbacks.discard_b(event)
+ bj += 1
+ end
end
end