Skip to content

Commit 53ffe25

Browse files
committed
Remove a redundant Symbol#to_s
Follow up #11791. RuboCop runtime supports only Ruby >= 2.7, so it removes a redundant `Symbol#to_s`.
1 parent 689d473 commit 53ffe25

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/rubocop/cop/metrics/utils/abc_size_calculator.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ def simple_assignment?(node)
117117
end
118118

119119
def capturing_variable?(name)
120-
# TODO: Remove `Symbol#to_s` after supporting only Ruby >= 2.7.
121-
name && !name.to_s.start_with?('_')
120+
name && !name.start_with?('_')
122121
end
123122

124123
def branch?(node)

0 commit comments

Comments
 (0)