def foo1(it = 'bar') puts it 'baz'.then { puts it } end foo1 def foo2(its = 'bar') puts its 'baz'.then { |its| puts its } end foo2
Lint/ShadowingOuterLocalVariable
doesn't warn when a function parameter named it
takes precedence over an implicit it
in a block.
Warn about it (pun intended).
Describe alternatives you've consideredRather, warn about using it
as a function parameter, which seems like asking for trouble in the first place.
I love it
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4