From 71b8608421b88161df79058d2d95dba39edd3ada Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 12:16:56 +0000 Subject: [PATCH] code cleanup: rubocop: fix Performance/RedundantBlockCall in test/functional/repositories_git_controller_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18814 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - test/functional/repositories_git_controller_test.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f6ca447d7..14e1519ce 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -530,7 +530,6 @@ Performance/FixedSize: Performance/RedundantBlockCall: Exclude: - 'app/controllers/application_controller.rb' - - 'test/functional/repositories_git_controller_test.rb' # Cop supports --auto-correct. Performance/RedundantMatch: diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index fbb9e69dc..a8c89eb39 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -689,7 +689,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest def with_cache(&block) before = ActionController::Base.perform_caching ActionController::Base.perform_caching = true - block.call + yield ActionController::Base.perform_caching = before end end