Merge pull request #4629 from shuujii/mrb_str_pool-can-embed-one-more-byte

`mrb_str_pool` can embed one more byte; ref #4626
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-08-12 22:41:51 +09:00
committed by GitHub
+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) {