Actions
Bug #22278
open`Coverage.line_stub` emits warnings found in source code
Bug #22278:
`Coverage.line_stub` emits warnings found in source code
Description
Coverage.line_stub is implemented via RubyVM::InstructionSequence.compile_file. That emits all warnings found in the source code when $VERBOSE = true.
I found this via simplecov. It can do coverage for compiled erb, and it also shows files that have never been used in tests via the aforementioned method. When that file is erb on disk, then trying to interpret it as ruby gives a plethora of warnings. Probably simplecov should not do that with erb in the first place, but that's another story.
I started seeing this from 4.0.3 -> 4.0.4 so I guess it was because of https://bugs.ruby-lang.org/issues/22018
Here is a simple reproducer:
No data to display
Actions