class Covered::Capture
def disable
def disable @trace&.disable super end
def enable
def enable super @trace&.enable end
def initialize(output)
def initialize(output) super(output) begin @trace = TracePoint.new(:line, :call, :c_call) do |event| if path = event.path @output.mark(path, event.lineno, 1) end end rescue warn "Line coverage disabled: #{$!}" @trace = nil end end