Skip to content

CAT 034

unurgunite edited this page Jul 11, 2026 · 3 revisions

CAT-034 — each_with_index.map → map_with_index

Field Value
Severity info
Confidence high
Auto-fix

each_with_index.map → map_with_index — Use map_with_index instead of each_with_index + map for cleaner and more efficient code.

Bad code

ary.each_with_index.map { |x, i| ... }

Clone this wiki locally