summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 492fd3d..8d3df90 100644
--- a/parse.y
+++ b/parse.y
@@ -11445,9 +11445,11 @@ ripper_initialize(int argc, VALUE *argv, VALUE self)
parser->eofp = Qfalse;
if (NIL_P(fname)) {
fname = STR_NEW2("(ripper)");
+ OBJ_FREEZE(fname);
}
else {
StringValue(fname);
+ fname = rb_str_new_frozen(fname);
}
parser_initialize(parser);