Actions
Bug #22018
closedISeq created via `RubyVM::InstructionSequence.compile` don't support coverage
Bug #22018:
ISeq created via `RubyVM::InstructionSequence.compile` don't support coverage
Description
Reproduction:
require "coverage"
File.write("/tmp/a.rb", <<~RUBY)
module CoverableRaw
def self.call
"cover up"
end
end
CoverableRaw.call
RUBY
Coverage.start
require "/tmp/a.rb"
p Coverage.result
File.write("/tmp/b.rb", <<~RUBY)
module Coverable
def self.call
"cover up"
end
end
Coverable.call
RUBY
class RubyVM::InstructionSequence
def self.load_iseq(path)
compile_file(path)
end
end
Coverage.start
require "/tmp/b.rb"
p Coverage.result
Expected:
{"/tmp/a.rb" => [1, 1, 1, nil, nil, nil, 1]}
{"/tmp/b.rb" => [1, 1, 1, nil, nil, nil, 1]}
Actual:
{"/tmp/a.rb" => [1, 1, 1, nil, nil, nil, 1]}
{}
Updated by byroot (Jean Boussier) 16 days ago
- Status changed from Open to Closed
Applied in changeset git|8bf6d7bfcb4ca46d2cfe73bdbce2fdb0652b1aae.
Fix coverage support for RubyVM::ISeq.compile
[Bug #22018]
ISeq returned by RubyVM::InstructionSequene.load_iseq weren't
handled by the coverage module.
Updated by byroot (Jean Boussier) 16 days ago
Backports:
Updated by nagachika (Tomoyuki Chikanaga) 15 days ago
- Backport changed from 3.3: WONTFIX, 3.4: REQUIRED, 4.0: REQUIRED to 3.3: WONTFIX, 3.4: DONE, 4.0: REQUIRED
ruby_3_4: merged at 469d90739a3f623648feeac3c93b961ac8fe20a2.
Updated by byroot (Jean Boussier) 15 days ago
- Backport changed from 3.3: WONTFIX, 3.4: DONE, 4.0: REQUIRED to 3.3: WONTFIX, 3.4: DONE, 4.0: DONE
Updated by byroot (Jean Boussier) 15 days ago
ยท Edited
ruby_4_0: merged at 4c564ee28e6da275a718e9961aa902bc052c9c1a.
Actions