summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'load.c')
-rw-r--r--load.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/load.c b/load.c
index 1309d566b9..89e9ea8f99 100644
--- a/load.c
+++ b/load.c
@@ -746,6 +746,7 @@ load_iseq_eval(rb_execution_context_t *ec, VALUE fname)
if (*rb_ruby_prism_ptr()) {
pm_parse_result_t result = { 0 };
result.options.line = 1;
+ result.node.coverage_enabled = 1;
VALUE error = pm_load_parse_file(&result, fname);
@@ -762,13 +763,13 @@ load_iseq_eval(rb_execution_context_t *ec, VALUE fname)
}
else {
rb_ast_t *ast;
- VALUE vast;
+ VALUE ast_value;
VALUE parser = rb_parser_new();
rb_parser_set_context(parser, NULL, FALSE);
- vast = rb_parser_load_file(parser, fname);
- ast = rb_ruby_ast_data_get(vast);
+ ast_value = rb_parser_load_file(parser, fname);
+ ast = rb_ruby_ast_data_get(ast_value);
- iseq = rb_iseq_new_top(vast, rb_fstring_lit("<top (required)>"),
+ iseq = rb_iseq_new_top(ast_value, rb_fstring_lit("<top (required)>"),
fname, realpath_internal_cached(realpath_map, fname), NULL);
rb_ast_dispose(ast);
}
@@ -1283,7 +1284,7 @@ require_internal(rb_execution_context_t *ec, VALUE fname, int exception, bool wa
else {
switch (found) {
case 'r':
- load_iseq_eval(ec, path);
+ load_iseq_eval(saved.ec, path);
break;
case 's':