rspec/rules/S1117/why-general.adoc

9 lines
324 B
Plaintext
Raw Normal View History

== Why is this an issue?
Variable shadowing happens when a variable declared in a specific scope has the same name as a variable in an outer scope.
include::problems.adoc[]
To avoid these problems, rename the shadowing, shadowed, or both variables to accurately represent their purpose with unique and meaningful names.