From dfb297e3c4a521fe360c9462dbfc7eafd826f6bf Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Mon, 12 Aug 2019 21:42:31 +0900 Subject: `mrb_str_pool` can embed one more byte; ref #4626 --- src/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/state.c b/src/state.c index e5e0161bf..69b069304 100644 --- a/src/state.c +++ b/src/state.c @@ -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) { -- cgit v1.2.3