Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Aug 21, 2025

This PR fixes an incorrect autocorrect for Style/BitwisePredicate when using & with LHS flags in conjunction with == for comparisons.

Fixes #14469.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@koic koic force-pushed the fix_an_incorrect_autocorrect_for_style_bitwise_predicate branch 2 times, most recently from b1532d0 to fdff527 Compare August 21, 2025 08:03
…edicate`

This PR fixes an incorrect autocorrect for `Style/BitwisePredicate`
when using `&` with RHS flags in conjunction with `==` for comparisons.

Fixes rubocop#14469.
@koic koic force-pushed the fix_an_incorrect_autocorrect_for_style_bitwise_predicate branch from fdff527 to a830800 Compare August 21, 2025 08:10
@bbatsov bbatsov merged commit 570889a into rubocop:master Aug 21, 2025
22 checks passed
@koic koic deleted the fix_an_incorrect_autocorrect_for_style_bitwise_predicate branch August 21, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect suggestion in Style/BitwisePredicate

2 participants