summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-03-06 11:04:22 -0500
committerPeter Zhu <[email protected]>2024-03-06 13:11:41 -0500
commitb4a69351ec7d6f0a5e34e3bb586053814be352c0 (patch)
tree7d413d26f6bcb60e98d3b353037c2406bc54c612 /io.c
parentb88973165a9e970793eb187a4223d7521031ebc3 (diff)
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.
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
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",