Skip to content

CAT 036

unurgunite edited this page Jul 11, 2026 · 3 revisions

CAT-036 — chars.each → each_char

Field Value
Severity info
Confidence high
Auto-fix

chars.each → each_char — Use each_char instead of .chars.each to avoid allocating an intermediate array of characters.

Bad code

str.chars.each { |c| ... }

Clone this wiki locally