Project

General

Profile

Bug #15332

coverage and InstructionSequence regression

Added by marcandre (Marc-Andre Lafortune) 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
[ruby-core:89991]

Description

With the current head:

    require 'coverage'
    Coverage.start
    RubyVM::InstructionSequence.compile("puts 'hi'", 'hello_world.rb').eval
    Coverage.result # => {}, should be {'hello_world.rb' => [1]}

This is not intended, right?

History

Updated by mame (Yusuke Endoh) 10 months ago

The change itself is actually not intended.
But I'm unsure if it should handle ISeq-loaded code as a measuring target, because currently eval-loaded code is not a target:

require 'coverage'
Coverage.start
eval("puts 'hi'", binding, "hello_world.rb")
p Coverage.result # => {} in 2.5 and trunk

Do you have actual use case? (Is it needed for bootsnap or so?) If not, I'd like to add it into NEWS as a subtle incompatibility.

Updated by marcandre (Marc-Andre Lafortune) 10 months ago

I don't have an important use case, no.

#3

Updated by naruse (Yui NARUSE) 9 months ago

  • Status changed from Open to Closed

Also available in: Atom PDF