crystal-ameba / ameba

A static code analysis tool for Crystal
https://crystal-ameba.github.io
MIT License
514 stars 35 forks source link

Revert "Fix `Performance/ExcessiveAllocations` to exclude `each` call… #428

Closed Sija closed 9 months ago

Sija commented 9 months ago

…s without a block"

This reverts commit 29e29b8e1d04b9126fb692e2da930a6536d3bceb.


This change turned out to be incorrect.

Sija commented 9 months ago

Sure, the commit in question restricted the rule to report only calls with blocks, which is incorrect, since the same optimization can be applied to iterators (same calls without a block)