Project

General

Profile

Actions

Bug #21192

closed

Coverage no longer reports coverage information about tracepoint handlers

Added by deivid (David Rodríguez) 11 days ago. Updated 11 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:121403]

Description

I minimized the issue like this:

repro.rb

require "coverage"

Coverage.start

require_relative "a"

puts Coverage.result

a.rb

TracePoint.trace(:line) do |tp|
  puts "TracePoint handler"
end

puts "Outside"

In Ruby 2.5, program's out was:

$ docker run --rm -it --mount type=bind,source=$(pwd),target=/foo ruby:2.5 ruby /foo/repro.rb
TracePoint handler
Outside
TracePoint handler
{"/foo/a.rb"=>[1, 2, nil, nil, 1]}

In Ruby 2.6 or higher:

$ docker run --rm -it --mount type=bind,source=$(pwd),target=/foo ruby:3.4 ruby /foo/repro.rb
TracePoint handler
Outside
TracePoint handler
{"/foo/a.rb" => [1, 0, nil, nil, 1]}

Updated by mame (Yusuke Endoh) 11 days ago

This is a duplicate of #16776 that you created, isn't it? :-)

Updated by deivid (David Rodríguez) 11 days ago

Oh my, I had forgotten about it, sorry for the noise!

Updated by mame (Yusuke Endoh) 11 days ago

  • Status changed from Open to Closed

Don't mind, I understand it as a problem. Others have pointed this problem out to me. We need to convince @ko1 (Koichi Sasada).

Closing this ticket. Continue in #16776.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like1