Commit 6ac0a142 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Remove unnecessary begin/end

parent 7ce0a61a
...@@ -67,12 +67,10 @@ module Gitlab ...@@ -67,12 +67,10 @@ module Gitlab
end end
def with_temp_file(storage_name) def with_temp_file(storage_name)
begin temp_file_path = Dir::Tmpname.create(%w(fs_shards_check +deleted), storage_path(storage_name)) { |path| path }
temp_file_path = Dir::Tmpname.create(%w(fs_shards_check +deleted), storage_path(storage_name)) { |path| path } yield temp_file_path
yield temp_file_path ensure
ensure delete_test_file(temp_file_path)
delete_test_file(temp_file_path)
end
end end
def storage_path(storage_name) def storage_path(storage_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment