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.
def array(tag, options={}, &block)
@struct << []
- block.call(self)
+ yield(self)
ret = @struct.pop
@struct.last[tag] = ret
@struct.last.merge!(options) if options
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