mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[DOC] Document of Coverage.line_stub from NEWS-2.6.0
This commit is contained in:
parent
4170b70d32
commit
953fee11b3
Notes:
git
2025-11-09 13:16:57 +00:00
@ -1,6 +1,11 @@
|
||||
require "coverage.so"
|
||||
|
||||
module Coverage
|
||||
# call-seq:
|
||||
# line_stub(file) -> array
|
||||
#
|
||||
# A simple helper function that creates the "stub" of line coverage
|
||||
# from a given source code.
|
||||
def self.line_stub(file)
|
||||
lines = File.foreach(file).map { nil }
|
||||
iseqs = [RubyVM::InstructionSequence.compile_file(file)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user