Skip to content

CAT 035

unurgunite edited this page Jul 11, 2026 · 3 revisions

CAT-035 — split("") → each_char

Field Value
Severity hint
Confidence high
Auto-fix

split("") → each_char — Use `each_char` instead of `split("")` to iterate over characters without allocating an array.

Bad code

str.split("").each { |c| ... }

Clone this wiki locally