Comment on Never create Ruby strings longer than 23 charactersparentComments−al2o3cr12yIt's using the storage in an RString struct that isn't otherwise occupied by the RBasic info:https://github.com/ruby/ruby/blob/8f77cfb308061ff49de0a47e82...Note the `as` union. The `heap` version has three VALUE-sized entries, so RSTRING_EMBED_LEN_MAX is calculated accordingly, with the -1 to account for the null terminator.
Comments
It's using the storage in an RString struct that isn't otherwise occupied by the RBasic info:
https://github.com/ruby/ruby/blob/8f77cfb308061ff49de0a47e82...
Note the `as` union. The `heap` version has three VALUE-sized entries, so RSTRING_EMBED_LEN_MAX is calculated accordingly, with the -1 to account for the null terminator.