3 ms·
It's using the storage in an RString struct that isn't otherwise occupied by the RBasic info: https://github.com/ruby/ruby/blob/8f77cfb308061ff49de0a47e82816c8
by al2o3cr 13y ago
It's using the storage in an RString struct that isn't otherwise occupied by the RBasic info:
https://github.com/ruby/ruby/blob/8f77cfb308061ff49de0a47e82816c8dafa27963/include/ruby/ruby.h#L819 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.