ARY_CAPA handles capacity for embedded arrays by itself.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-08-18 23:38:17 +09:00
parent 8fbc4bef55
commit 8b5be554c7
-3
View File
@@ -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: