[ruby-core:121403] [Ruby Bug#21192] Coverage no longer reports coverage information about tracepoint handlers

Issue #21192 has been reported by deivid (David Rodríguez). ---------------------------------------- Bug #21192: Coverage no longer reports coverage information about tracepoint handlers https://bugs.ruby-lang.org/issues/21192 * Author: deivid (David Rodríguez) * Status: Open * ruby -v: 2.6 until now * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I minimized the issue like this: ### repro.rb ```ruby require "coverage" Coverage.start require_relative "a" puts Coverage.result ``` ### a.rb ```ruby 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]} ``` -- https://bugs.ruby-lang.org/

Issue #21192 has been updated by mame (Yusuke Endoh). This is a duplicate of #16776 that you created, isn't it? :-) ---------------------------------------- Bug #21192: Coverage no longer reports coverage information about tracepoint handlers https://bugs.ruby-lang.org/issues/21192#change-112381 * Author: deivid (David Rodríguez) * Status: Open * ruby -v: 2.6 until now * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I minimized the issue like this: ### repro.rb ```ruby require "coverage" Coverage.start require_relative "a" puts Coverage.result ``` ### a.rb ```ruby 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]} ``` -- https://bugs.ruby-lang.org/

Issue #21192 has been updated by deivid (David Rodríguez). Oh my, I had forgotten about it, sorry for the noise! ---------------------------------------- Bug #21192: Coverage no longer reports coverage information about tracepoint handlers https://bugs.ruby-lang.org/issues/21192#change-112382 * Author: deivid (David Rodríguez) * Status: Open * ruby -v: 2.6 until now * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I minimized the issue like this: ### repro.rb ```ruby require "coverage" Coverage.start require_relative "a" puts Coverage.result ``` ### a.rb ```ruby 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]} ``` -- https://bugs.ruby-lang.org/

Issue #21192 has been updated by mame (Yusuke Endoh). 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. Closing this ticket. Continue in #16776. ---------------------------------------- Bug #21192: Coverage no longer reports coverage information about tracepoint handlers https://bugs.ruby-lang.org/issues/21192#change-112383 * Author: deivid (David Rodríguez) * Status: Closed * ruby -v: 2.6 until now * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I minimized the issue like this: ### repro.rb ```ruby require "coverage" Coverage.start require_relative "a" puts Coverage.result ``` ### a.rb ```ruby 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]} ``` -- https://bugs.ruby-lang.org/
participants (2)
-
deivid
-
mame (Yusuke Endoh)