lib/rubocop/cop/metrics/block_nesting.rb in rubocop-0.47.1 vs lib/rubocop/cop/metrics/block_nesting.rb in rubocop-0.48.0
- old
+ new
@@ -12,13 +12,13 @@
#
# The maximum level of nesting allowed is configurable.
class BlockNesting < Cop
include ConfigurableMax
- NESTING_BLOCKS = [
- :case, :if, :while, :while_post,
- :until, :until_post, :for, :resbody
- ].freeze
+ NESTING_BLOCKS = %i(
+ case if while while_post
+ until until_post for resbody
+ ).freeze
def investigate(processed_source)
return unless processed_source.ast
max = cop_config['Max']
check_nesting_level(processed_source.ast, max, 0)