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 | 6b9bf6306e52d56abeabf2cd7f4754376161e29a (patch) | |
tree | 035fb6c0009f1b87273ff6320531a96fe22e53c0 /insns.def | |
parent | 6e969a106e9a5aefcef9253a0692d40c4330c980 (diff) | |
download | ruby-6b9bf6306e52d56abeabf2cd7f4754376161e29a.tar.gz |
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 |