Pattern: Shadowed argument
Issue: -
This rule checks for arguments that were shadowed by local variables before they were used.
# bad
do_something do |foo|
foo = 42
puts foo
end
def do_something(foo)
foo = 42
puts foo
end
# good
do_something do |foo|
foo = foo + 42
puts foo
end
def do_something(foo)
foo = foo + 42
puts foo
end
def do_something(foo)
puts foo
end
Attribute | Value |
---|---|
IgnoreImplicitReferences | false |