Skip to content

CAT 050

unurgunite edited this page Jul 11, 2026 · 3 revisions

CAT-050 — Fiber.new → spawn

Severity: warning | Confidence: high | Auto-fix:

Description

Fiber.new → spawn — Use spawn instead of Fiber.new + .resume for simpler and more idiomatic concurrency.

Bad code

fiber = Fiber.new { do_work }
fiber.resume

Performance Impact

Tip

This rule can significantly improve performance in hot code paths.

Benchmark

Note

See bench results at bench/cat-050/

Clone this wiki locally