Comment on Never create Ruby strings longer than 23 charactersparentComments−dchest14yIt seems like the length is stored inside RString's RBasic->flags: #define RSTRING_EMBED_LEN(str) \ (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \ (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT))
Comments
It seems like the length is stored inside RString's RBasic->flags: