aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 3bff42ac56..de2a92285c 100644
--- a/parse.y
+++ b/parse.y
@@ -5812,7 +5812,7 @@ yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
p->ruby_sourcefile = "(none)";
}
else {
- p->ruby_sourcefile_string = rb_str_new_frozen(fname);
+ p->ruby_sourcefile_string = rb_fstring(fname);
p->ruby_sourcefile = StringValueCStr(fname);
}
p->ruby_sourceline = line - 1;
@@ -9773,7 +9773,7 @@ gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
if (NIL_P(file))
file = rb_str_new(0, 0);
else
- file = rb_str_dup(rb_fstring(file));
+ file = rb_str_dup(file);
node = NEW_STR(add_mark_object(p, file), loc);
}
return node;