From 7413079dae81e46aefc948cd8872497567945791 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 15 Feb 2023 10:42:52 +0100 Subject: Encapsulate RCLASS_ATTACHED_OBJECT Right now the attached object is stored as an instance variable and all the call sites that either get or set it have to know how it's stored. It's preferable to hide this implementation detail behind accessors so that it is easier to change how it's stored. --- object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'object.c') diff --git a/object.c b/object.c index 54f516314e..c64af1d79c 100644 --- a/object.c +++ b/object.c @@ -1587,7 +1587,7 @@ rb_mod_to_s(VALUE klass) if (FL_TEST(klass, FL_SINGLETON)) { VALUE s = rb_usascii_str_new2("#