From 8b5be554c7b7b45722be9baccfd1278905a2565e Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 18 Aug 2017 23:38:17 +0900 Subject: `ARY_CAPA` handles capacity for embedded arrays by itself. --- src/string.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index 801e77f16..c5efd779f 100644 --- a/src/string.c +++ b/src/string.c @@ -2560,9 +2560,6 @@ mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len) } capa = RSTR_CAPA(s); - if (capa <= RSTRING_EMBED_LEN_MAX) - capa = RSTRING_EMBED_LEN_MAX+1; - total = RSTR_LEN(s)+len; if (total >= MRB_INT_MAX) { size_error: -- cgit v1.2.3