diff --git a/string.c b/string.c index e5db1feef6..476cff75d4 100644 --- a/string.c +++ b/string.c @@ -2024,7 +2024,7 @@ str_buf_cat(VALUE str, const char *ptr, long len) if (ptr >= RSTRING_PTR(str) && ptr <= RSTRING_END(str)) { off = ptr - RSTRING_PTR(str); } - str_modify_keep_cr(str); + rb_str_modify(str); if (len == 0) return 0; if (STR_EMBED_P(str)) { capa = RSTRING_EMBED_LEN_MAX;