-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
def foo1(it = 'bar')
puts it
'baz'.then { puts it }
end
foo1
def foo2(its = 'bar')
puts its
'baz'.then { |its| puts its }
end
foo2bar
bar
bar
baz
Lint/ShadowingOuterLocalVariable doesn't warn when a function parameter named it takes precedence over an implicit it in a block.
Describe the solution you'd like
Warn about it (pun intended).
Describe alternatives you've considered
Rather, warn about using it as a function parameter, which seems like asking for trouble in the first place.
Additional context
I love it.
a-lavis