-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Expected behavior
When using:
Style/BlockDelimiters:
EnforcedStyle: semanticThe following code should be valid:
case hash.detect { |_, value| value }
in [key, _] then key
endActual behavior
Fails with the following offense:
block_delimiters_false_positive.rb:3:18: C: [Correctable] Style/BlockDelimiters: Prefer do...end over {...} for procedural blocks.
case hash.detect { |_, value| value }
^
Steps to reproduce the problem
Configure Rubocop as above and use the example shown.
RuboCop version
1.70.0 (using Parser 3.3.7.0, rubocop-ast 1.37.0, analyzing as Ruby 3.3, running on ruby 3.3.4) [arm64-darwin23]
- rubocop-capybara 2.21.0
- rubocop-rails 2.25.1
- rubocop-rspec 3.0.3
Reactions are currently unavailable