Skip to content

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

class method

Coverage.result

Coverage.result(stop: true, clear: true) => hash

Returns a hash that contains filename as key and coverage array as value. If clear is true, it clears the counters to zero. If stop is true, it disables coverage measurement.

See also .peek_result .resume .line_stub .running? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0