From 6ac0a142e00e5bf0945ea624c93bbfe54c91a14e Mon Sep 17 00:00:00 2001 From: Pawel Chojnacki <pawel@chojnacki.ws> Date: Wed, 26 Jul 2017 17:16:59 +0200 Subject: [PATCH] Remove unnecessary begin/end --- lib/gitlab/health_checks/fs_shards_check.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/gitlab/health_checks/fs_shards_check.rb b/lib/gitlab/health_checks/fs_shards_check.rb index 928fb014ef4..a4740e9e9b7 100644 --- a/lib/gitlab/health_checks/fs_shards_check.rb +++ b/lib/gitlab/health_checks/fs_shards_check.rb @@ -67,12 +67,10 @@ module Gitlab end def with_temp_file(storage_name) - begin - temp_file_path = Dir::Tmpname.create(%w(fs_shards_check +deleted), storage_path(storage_name)) { |path| path } - yield temp_file_path - ensure - delete_test_file(temp_file_path) - end + temp_file_path = Dir::Tmpname.create(%w(fs_shards_check +deleted), storage_path(storage_name)) { |path| path } + yield temp_file_path + ensure + delete_test_file(temp_file_path) end def storage_path(storage_name) -- GitLab