summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-02-15 15:18:01 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-02-16 08:14:44 +0100
commit1a4b4cd7f8b53fc52191c1ddcf3f624a5e687c24 (patch)
tree2143cb0a59d5f680d0c2c245b4698f51f75b952d /marshal.c
parent1df75d658674d511780e578d3a394e1a9bcee5be (diff)
downloadruby-1a4b4cd7f8b53fc52191c1ddcf3f624a5e687c24.tar.gz
Move `attached_object` into `rb_classext_struct`
Given that signleton classes don't have an allocator, we can re-use these bytes to store the attached object in `rb_classext_struct` without making it larger.
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 78e5bde0a2..af952048af 100644
--- a/marshal.c
+++ b/marshal.c
@@ -523,7 +523,7 @@ hash_each(VALUE key, VALUE value, VALUE v)
#define SINGLETON_DUMP_UNABLE_P(klass) \
(rb_id_table_size(RCLASS_M_TBL(klass)) > 0 || \
- rb_ivar_count(klass) > 1)
+ rb_ivar_count(klass) > 0)
static void
w_extended(VALUE klass, struct dump_arg *arg, int check)