aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--string.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ce7742b91e..69e4b624ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Apr 25 14:26:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (str_buf_cat): expand later so that the buffer can be
+ larger for further use. [Bug #11080] [Bug #11080]
+
Fri Apr 24 23:48:45 2015 Akinori MUSHA <knu@iDaemons.org>
* misc/ruby-electric.el: Import version 2.2.3 from
diff --git a/string.c b/string.c
index 82e5a5c5a4..d85033ea6c 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_expand(str, len);
+ rb_str_modify(str);
if (len == 0) return 0;
if (STR_EMBED_P(str)) {
capa = RSTRING_EMBED_LEN_MAX;