aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/symbol.c b/symbol.c
index cf21cff0c1..046c8e1105 100644
--- a/symbol.c
+++ b/symbol.c
@@ -739,7 +739,8 @@ rb_str_intern(VALUE str)
enc = ascii;
}
else {
- str = rb_str_new_frozen(str);
+ str = rb_str_dup(str);
+ OBJ_FREEZE(str);
}
str = rb_fstring(str);
type = rb_str_symname_type(str, IDSET_ATTRSET_FOR_INTERN);