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
This commit is contained in:
parent
02b52b2733
commit
0f6708eb9b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user