summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-05-20 11:29:50 -0400
committerKevin Newton <[email protected]>2024-05-20 12:28:47 -0400
commita708b6aa6589b06ed059ad40e7d4e71ebe0e16e3 ()
tree1691cf10b4ed6f21d2081241f8801a874b8ea9eb /iseq.c
parent78e504f21d3148b7b6fa78ea70d10426170f4112 (diff)
[PRISM] Respect eval coverage setting
-rw-r--r--iseq.c7
1 files changed, 7 insertions, 0 deletions
@@ -1029,8 +1029,13 @@ pm_iseq_new_with_opt(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpa
ISEQ_BODY(iseq)->prism = true;
ISEQ_BODY(iseq)->param.flags.use_block = true; // unused block warning is not supported yet
if (!option) option = &COMPILE_OPTION_DEFAULT;
pm_location_t *location = &node->base.location;
int32_t start_line = node->parser->start_line;
@@ -1273,6 +1278,7 @@ pm_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, V
pm_parse_result_t result = { 0 };
pm_options_line_set(&result.options, NUM2INT(line));
switch (option.frozen_string_literal) {
case ISEQ_FROZEN_STRING_LITERAL_UNSET:
@@ -1708,6 +1714,7 @@ iseqw_s_compile_file_prism(int argc, VALUE *argv, VALUE self)
pm_parse_result_t result = { 0 };
result.options.line = 1;
VALUE error = pm_load_parse_file(&result, file);