Skip to content

Commit

Permalink
Remove a redundant Symbol#to_s
Browse files Browse the repository at this point in the history
Follow up #11791.

RuboCop runtime supports only Ruby >= 2.7, so it removes a redundant `Symbol#to_s`.
  • Loading branch information
koic committed Jun 10, 2023
1 parent 689d473 commit 53ffe25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rubocop/cop/metrics/utils/abc_size_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def simple_assignment?(node)
end

def capturing_variable?(name)
# TODO: Remove `Symbol#to_s` after supporting only Ruby >= 2.7.
name && !name.to_s.start_with?('_')
name && !name.start_with?('_')
end

def branch?(node)
Expand Down

0 comments on commit 53ffe25

Please sign in to comment.