diff options
-rw-r--r-- | .rubocop_todo.yml | 1 | ||||
-rw-r--r-- | lib/redmine/views/builders/structure.rb | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 262f50366..f6ca447d7 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/lib/redmine/views/builders/structure.rb b/lib/redmine/views/builders/structure.rb index e37d3b86b..99db94be2 100644 --- a/lib/redmine/views/builders/structure.rb +++ b/lib/redmine/views/builders/structure.rb @@ -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 |