diff options
author | John Hawthorn <[email protected]> | 2025-05-14 11:06:46 -0700 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-26 10:31:54 +0200 |
commit | f483befd9065d159d3a944b87fe26179c5373c30 (patch) | |
tree | f1a5c935f88b726b1bd79c71dd53417c08118651 /string.c | |
parent | 2295384a5a89cd4acfbec27b19a671bd5301a757 (diff) |
Add shape_id to RBasic under 32 bit
This makes `RBobject` `4B` larger on 32 bit systems
but simplifies the implementation a lot.
[Feature #21353]
Co-authored-by: Jean Boussier <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13341
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -960,6 +960,8 @@ setup_fake_str(struct RString *fake_str, const char *name, long len, int encidx) { fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|STR_NOFREE|STR_FAKESTR; + rb_shape_set_shape_id((VALUE)fake_str, 0); + if (!name) { RUBY_ASSERT_ALWAYS(len == 0); name = ""; |