]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Performance/RedundantBlockCall in lib/redmine/views/builde...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 12:10:14 +0000 (12:10 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 12:10:14 +0000 (12:10 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18813 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/views/builders/structure.rb

index 262f50366c9fdbcaf4a7a2dbe4abf07b600653a8..f6ca447d72164e2c00193d5bef13a2a000887bdb 100644 (file)
@@ -530,7 +530,6 @@ Performance/FixedSize:
 Performance/RedundantBlockCall:
   Exclude:
     - 'app/controllers/application_controller.rb'
-    - 'lib/redmine/views/builders/structure.rb'
     - 'test/functional/repositories_git_controller_test.rb'
 
 # Cop supports --auto-correct.
index e37d3b86b29c211be3a5ade4172de3c7666883a4..99db94be205c9a48b96f33ebc2d70d24bd2a87ca 100644 (file)
@@ -32,7 +32,7 @@ module Redmine
 
         def array(tag, options={}, &block)
           @struct << []
-          block.call(self)
+          yield(self)
           ret = @struct.pop
           @struct.last[tag] = ret
           @struct.last.merge!(options) if options
@@ -72,7 +72,7 @@ module Redmine
 
           if block
             @struct << (args.first.is_a?(Hash) ? args.first : {})
-            block.call(self)
+            yield(self)
             ret = @struct.pop
             if @struct.last.is_a?(Array)
               @struct.last << ret