summaryrefslogtreecommitdiff
path: root/lib/chef/util/diff.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/util/diff.rb')
-rw-r--r--lib/chef/util/diff.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/util/diff.rb b/lib/chef/util/diff.rb
index ce2b014600..806da5922e 100644
--- a/lib/chef/util/diff.rb
+++ b/lib/chef/util/diff.rb
@@ -106,16 +106,16 @@ class Chef
# join them. otherwise, print out the old one.
old_hunk = hunk = nil
diff_data.each do |piece|
- begin
- hunk = ::Diff::LCS::Hunk.new(old_data, new_data, piece, 3, file_length_difference)
- file_length_difference = hunk.file_length_difference
- next unless old_hunk
- next if hunk.merge(old_hunk)
-
- diff_str << old_hunk.diff(:unified) << "\n"
- ensure
- old_hunk = hunk
- end
+
+ hunk = ::Diff::LCS::Hunk.new(old_data, new_data, piece, 3, file_length_difference)
+ file_length_difference = hunk.file_length_difference
+ next unless old_hunk
+ next if hunk.merge(old_hunk)
+
+ diff_str << old_hunk.diff(:unified) << "\n"
+ ensure
+ old_hunk = hunk
+
end
diff_str << old_hunk.diff(:unified) << "\n"
diff_str