From b4a69351ec7d6f0a5e34e3bb586053814be352c0 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 6 Mar 2024 11:04:22 -0500 Subject: Move FL_SINGLETON to FL_USER1 This frees FL_USER0 on both T_MODULE and T_CLASS. Note: prior to this, FL_SINGLETON was never set on T_MODULE, so checking for `FL_SINGLETON` without first checking that `FL_TYPE` was `T_CLASS` was valid. That's no longer the case. --- io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index f77e5f85c8..1449853c63 100644 --- a/io.c +++ b/io.c @@ -112,6 +112,7 @@ #include "encindex.h" #include "id.h" #include "internal.h" +#include "internal/class.h" #include "internal/encoding.h" #include "internal/error.h" #include "internal/inits.h" @@ -2276,7 +2277,7 @@ rb_io_writev(VALUE io, int argc, const VALUE *argv) if (argc > 1 && rb_obj_method_arity(io, id_write) == 1) { if (io != rb_ractor_stderr() && RTEST(ruby_verbose)) { VALUE klass = CLASS_OF(io); - char sep = FL_TEST(klass, FL_SINGLETON) ? (klass = io, '.') : '#'; + char sep = RCLASS_SINGLETON_P(klass) ? (klass = io, '.') : '#'; rb_category_warning( RB_WARN_CATEGORY_DEPRECATED, "%+"PRIsVALUE"%c""write is outdated interface" " which accepts just one argument", -- cgit v1.2.3