diff options
author | Kevin Newton <[email protected]> | 2024-02-06 11:59:49 -0500 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2024-02-06 12:36:46 -0500 |
commit | ccec209b2cced2ddb8463c4933ef729a44d0363c (patch) | |
tree | c141003ad30ea544802b1e2031b4fa81d9fd451b /prism_compile.c | |
parent | d77172b79b1cd28bc38a75162e41d2c8b6e71088 (diff) |
[PRISM] Fix fsl coming from file
Diffstat (limited to 'prism_compile.c')
-rw-r--r-- | prism_compile.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/prism_compile.c b/prism_compile.c index c529c4d88c..2e1666524f 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -773,12 +773,13 @@ pm_interpolated_node_compile(pm_node_list_t *parts, rb_iseq_t *iseq, NODE dummy_ current_string = rb_enc_str_new(NULL, 0, enc); } - if (parser->frozen_string_literal) { + if (ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) { ADD_INSN1(ret, &dummy_line_node, putobject, rb_str_freeze(current_string)); } else { ADD_INSN1(ret, &dummy_line_node, putstring, rb_str_freeze(current_string)); } + current_string = Qnil; number_of_items_pushed++; @@ -793,12 +794,14 @@ pm_interpolated_node_compile(pm_node_list_t *parts, rb_iseq_t *iseq, NODE dummy_ if (RTEST(current_string)) { current_string = rb_fstring(current_string); - if (parser->frozen_string_literal) { + + if (ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal) { ADD_INSN1(ret, &dummy_line_node, putobject, current_string); } else { ADD_INSN1(ret, &dummy_line_node, putstring, current_string); } + current_string = Qnil; number_of_items_pushed++; } |