summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/marshal.c b/marshal.c
index 1507116f5f..6348891e05 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1874,6 +1874,9 @@ r_object_for(struct load_arg *arg, bool partial, int *ivp, VALUE extmod, int typ
}
v = (VALUE)link;
if (!st_lookup(arg->partial_objects, (st_data_t)v, &link)) {
+ if (arg->freeze && RB_TYPE_P(v, T_STRING)) {
+ v = rb_str_to_interned_str(v);
+ }
v = r_post_proc(v, arg);
}
break;