rspec/rules/S2114/description.adoc

4 lines
315 B
Plaintext
Raw Normal View History

2020-06-30 12:48:07 +02:00
Passing a collection as an argument to the collection's own method is either an error - some other argument was intended - or simply nonsensical code.
Further, because some methods require that the argument remain unmodified during the execution, passing a collection to itself can result in undefined behavior.