code cleanup: rubocop: fix Performance/RedundantBlockCall in lib/redmine/scm/adapters/abstract_adapter.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18820 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-10-22 12:41:09 +00:00
parent 00820109e9
commit 319eeae14d
2 changed files with 1 additions and 2 deletions

View File

@@ -530,7 +530,6 @@ Performance/FixedSize:
Performance/RedundantBlockCall: Performance/RedundantBlockCall:
Exclude: Exclude:
- 'app/controllers/application_controller.rb' - 'app/controllers/application_controller.rb'
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
# Cop supports --auto-correct. # Cop supports --auto-correct.
Performance/RedundantMatch: Performance/RedundantMatch:

View File

@@ -249,7 +249,7 @@ module Redmine
IO.popen(cmd, mode) do |io| IO.popen(cmd, mode) do |io|
io.set_encoding("ASCII-8BIT") if io.respond_to?(:set_encoding) io.set_encoding("ASCII-8BIT") if io.respond_to?(:set_encoding)
io.close_write unless options[:write_stdin] io.close_write unless options[:write_stdin]
block.call(io) if block_given? yield(io) if block_given?
end end
rescue => e rescue => e
msg = strip_credential(e.message) msg = strip_credential(e.message)