mirror of
https://github.com/redmine/redmine.git
synced 2025-12-21 16:00:30 +01:00
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:
@@ -530,7 +530,6 @@ Performance/FixedSize:
|
||||
Performance/RedundantBlockCall:
|
||||
Exclude:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
Performance/RedundantMatch:
|
||||
|
||||
@@ -249,7 +249,7 @@ module Redmine
|
||||
IO.popen(cmd, mode) do |io|
|
||||
io.set_encoding("ASCII-8BIT") if io.respond_to?(:set_encoding)
|
||||
io.close_write unless options[:write_stdin]
|
||||
block.call(io) if block_given?
|
||||
yield(io) if block_given?
|
||||
end
|
||||
rescue => e
|
||||
msg = strip_credential(e.message)
|
||||
|
||||
Reference in New Issue
Block a user