mrb_str_pool can embed one more byte; ref #4626

This commit is contained in:
KOBAYASHI Shuji
2019-08-12 21:42:31 +09:00
parent f113fa2a4f
commit dfb297e3c4
+1 -1
View File
@@ -170,7 +170,7 @@ mrb_str_pool(mrb_state *mrb, mrb_value str)
len = s->as.heap.len;
}
if (len < RSTRING_EMBED_LEN_MAX) {
if (RSTR_EMBEDDABLE_P(len)) {
RSTR_SET_EMBED_FLAG(ns);
RSTR_SET_EMBED_LEN(ns, len);
if (ptr) {