diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2453,6 +2453,9 @@ rb_check_lockedtmp(VALUE str) static inline void str_modifiable(VALUE str) { + if (CHILLED_STRING_P(str)) { + CHILLED_STRING_MUTATED(str); + } rb_check_lockedtmp(str); rb_check_frozen(str); } @@ -3053,7 +3056,7 @@ rb_str_freeze(VALUE str) static VALUE str_uplus(VALUE str) { - if (OBJ_FROZEN(str)) { + if (OBJ_FROZEN(str) || CHILLED_STRING_P(str)) { return rb_str_dup(str); } else { |