[PRISM] Potentially enable coverage on the main script
This commit is contained in:
parent
76ccd1df37
commit
465cf8d80b
Notes:
git
2024-08-21 20:32:23 +00:00
6
ruby.c
6
ruby.c
@ -2186,6 +2186,12 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result)
|
||||
error = pm_parse_file(result, opt->script_name);
|
||||
}
|
||||
|
||||
// Check if (after requiring all of the files through -r flags) we have
|
||||
// coverage enabled and need to enable coverage on the main script.
|
||||
if (RTEST(rb_get_coverages())) {
|
||||
result->node.coverage_enabled = 1;
|
||||
}
|
||||
|
||||
// If we found an __END__ marker, then we're going to define a global
|
||||
// DATA constant that is a file object that can be read to read the
|
||||
// contents after the marker.
|
||||
|
Loading…
x
Reference in New Issue
Block a user