From ee0eca191f3ca486b6056234add436a8c1488dba Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 30 Nov 2023 14:48:26 -0500 Subject: Make String#undump compaction safe --- string.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index 8af608047a..9da5708964 100644 --- a/string.c +++ b/string.c @@ -7231,6 +7231,8 @@ str_undump(VALUE str) } } + RB_GC_GUARD(str); + return undumped; invalid_format: rb_raise(rb_eRuntimeError, "invalid dumped string; not wrapped with '\"' nor '\"...\".force_encoding(\"...\")' form"); -- cgit v1.2.3