Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
[Docs] Tweak the doc for Style/ConditionalAssignmentHelper
Browse files Browse the repository at this point in the history
This PR tweaks the doc for `Style/ConditionalAssignmentHelper`.
In rubocop#2480, the cop has been updated to also support comparison of variables.
  • Loading branch information
koic committed Feb 23, 2024
1 parent 1d43035 commit 2a86470
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/cop/style/conditional_assignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def assignment_rhs_exist?(node)
end

# Check for `if` and `case` statements where each branch is used for
# assignment to the same variable when using the return of the
# condition can be used instead.
# both the assignment and comparison of the same variable
# when using the return of the condition can be used instead.
#
# @example EnforcedStyle: assign_to_condition (default)
# # bad
Expand Down

0 comments on commit 2a86470

Please sign in to comment.