aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index d85033ea6c..82e5a5c5a4 100644
--- a/string.c
+++ b/string.c
@@ -2194,7 +2194,7 @@ str_buf_cat(VALUE str, const char *ptr, long len)
if (ptr >= sptr && ptr <= sptr + olen) {
off = ptr - sptr;
}
- rb_str_modify(str);
+ rb_str_modify_expand(str, len);
if (len == 0) return 0;
if (STR_EMBED_P(str)) {
capa = RSTRING_EMBED_LEN_MAX;