aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-25 05:26:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-25 05:26:22 +0000
commit2b0a6f47ac9ea1ac81c9d438ac9bc8d38b46cb04 (patch)
treedd3afd33a9f20dccbd75d6dda5eb193ccb104399 /string.c
parent9955bb0130c18648e064c97b86b5310e32d164e5 (diff)
downloadruby-2b0a6f47ac9ea1ac81c9d438ac9bc8d38b46cb04.tar.gz
revert r50336
* string.c (str_buf_cat): expand later so that the buffer can be larger for further use. [Bug #11080] [Bug #11080] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 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;