summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2025-05-14 11:06:46 -0700
committerJean Boussier <[email protected]>2025-05-26 10:31:54 +0200
commitf483befd9065d159d3a944b87fe26179c5373c30 (patch)
treef1a5c935f88b726b1bd79c71dd53417c08118651 /string.c
parent2295384a5a89cd4acfbec27b19a671bd5301a757 (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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/string.c b/string.c
index be749e74c5..3168b72343 100644
--- a/string.c
+++ b/string.c
@@ -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 = "";