Bug #15332
closed
coverage and InstructionSequence regression
Added by marcandre (Marc-Andre Lafortune) about 6 years ago.
Updated about 6 years ago.
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?
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.
I don't have an important use case, no.
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0