diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-12 04:04:31 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-12 04:04:31 +0000 |
commit | 0f6708eb9b0aa0826740656d52f6c65b32c2ec77 (patch) | |
tree | 035fb6c0009f1b87273ff6320531a96fe22e53c0 /insns.def | |
parent | 02b52b2733baf5a65b0e40a376cdb1bba61c8d6c (diff) |
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
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |