From 0f6708eb9b0aa0826740656d52f6c65b32c2ec77 Mon Sep 17 00:00:00 2001
From: shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Wed, 12 Sep 2018 04:04:31 +0000
Subject: resurrect the string to expect modifications

String#freeze can be redefined to be destructive.  While such
redefinition is definitely weird, it should be possible.  Resurrect
the string to prepare for that sort of things.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index d606fa722b..df0cd26517 100644
--- a/insns.def
+++ b/insns.def
@@ -760,7 +760,7 @@ opt_str_freeze
     val = vm_opt_str_freeze(str, BOP_FREEZE, idFreeze);
 
     if (val == Qundef) {
-        PUSH(str);
+        PUSH(rb_str_resurrect(str));
 #ifndef MJIT_HEADER
         ADD_PC(-WIDTH_OF_opt_send_without_block);
 #endif
@@ -777,7 +777,7 @@ opt_str_uminus
     val = vm_opt_str_freeze(str, BOP_UMINUS, idUMinus);
 
     if (val == Qundef) {
-        PUSH(str);
+        PUSH(rb_str_resurrect(str));
 #ifndef MJIT_HEADER
         ADD_PC(-WIDTH_OF_opt_send_without_block);
 #endif
-- 
cgit v1.2.3

