mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
[PRISM] Fix fsl coming from file
This commit is contained in:
parent
d77172b79b
commit
ccec209b2c
2 changed files with 13 additions and 3 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue