summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index deb7d2853b..e8f43d90ee 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1495,6 +1495,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
int options = r_byte(arg);
int has_encoding = FALSE;
+ v = r_entry(rb_reg_alloc(), arg);
if (ivp) {
r_ivar(str, &has_encoding, arg);
*ivp = FALSE;
@@ -1518,7 +1519,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
}
rb_str_set_len(str, dst - ptr);
}
- v = r_entry(rb_reg_new_str(str, options), arg);
+ v = r_entry(rb_reg_init_str(v, str, options), arg);
v = r_leave(v, arg);
}
break;