Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Coverage.start

Coverage.start => nil
Coverage.start(:all) => nil
Coverage.start(lines: bool, branches: bool, methods: bool) => nil
Coverage.start(oneshot_lines: true) => nil

Enables the coverage measurement. See the documentation of Coverage class in detail. This is equivalent to Coverage.setup and Coverage.resume.

See also .setup .state .running? .suspend also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0