diff options
author | Nick Thomas <nick@gitlab.com> | 2019-03-13 16:42:43 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-03-13 16:42:43 +0300 |
commit | 9f05e97aad33a0cd70862f67101bdcb3fddc639a (patch) | |
tree | a9868d2c6711ebff1dcbb06f6d09f91d15caa631 /app/models/merge_request_diff.rb | |
parent | 5ed9c5f7f74d7305bb884a6ae7a601d4563398a4 (diff) |
Run rubocop -a
Diffstat (limited to 'app/models/merge_request_diff.rb')
-rw-r--r-- | app/models/merge_request_diff.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index 351a662ae83..e53e2c8fc43 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -286,13 +286,11 @@ class MergeRequestDiff < ActiveRecord::Base return yield(@external_diff_file) if @external_diff_file external_diff.open do |file| - begin - @external_diff_file = file + @external_diff_file = file - yield(@external_diff_file) - ensure - @external_diff_file = nil - end + yield(@external_diff_file) + ensure + @external_diff_file = nil end end |