Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Coverage.start

(?lines: bool, ?branches: bool, ?methods: bool, ?eval: bool) -> nil
(oneshot_lines: bool, ?branches: bool, ?methods: bool, ?eval: bool) -> nil
(:all) -> nil
Coverage.start → nil
Coverage.start(type) → nil
Coverage.start(lines: false, branches: false, methods: false, eval: false, oneshot_lines: false) → nil

Enables coverage measurement. This method is equivalent to calling Coverage.setup with the arguments provided, and then calling Coverage.resume. See their respective documentation for more details.

See also .setup .state .running? .supported? also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0