Project

General

Profile

Actions

Bug #15332

closed

coverage and InstructionSequence regression

Added by marcandre (Marc-Andre Lafortune) about 6 years ago. Updated about 6 years ago.

Status:
Closed
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?

Updated by mame (Yusuke Endoh) about 6 years 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) about 6 years ago

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

Actions #3

Updated by naruse (Yui NARUSE) about 6 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0