rspec/rules/S1515/description.adoc
2020-06-30 17:16:12 +02:00

2 lines
282 B
Plaintext

Defining a function inside of a loop can yield unexpected results. Such a function keeps references to the variables which are defined in outer scopes. All function instances created inside the loop therefore see the same values for these variables, which is probably not expected.