diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-08-30 12:15:11 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-08-30 14:14:10 +0200 |
| commit | 01b89528cb663e1e533375d4282d906e49ca1496 (patch) | |
| tree | a6be43ca0e7388152acd93f7e8fa0a9f081050ba /class.c | |
| parent | fd0c772db7e5098c2b8e03559317a3592074dfe7 (diff) | |
object.c: improve fake_class_p to also handle T_MODULE
This requires ensuring T_MODULE never has FL_SINGLETON set,
so RMODULE_IS_REFINEMENT had to be moved.
Diffstat (limited to 'class.c')
| -rw-r--r-- | class.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -62,8 +62,8 @@ * 0: RCLASS_IS_ROOT * The class has been added to the VM roots. Will always be marked and pinned. * This is done for classes defined from C to allow storing them in global variables. - * 1: RMODULE_IS_REFINEMENT - * Module is used for refinements. + * 1: <reserved> + * Ensures that RUBY_FL_SINGLETON is never set on a T_MODULE. See `rb_class_real`. * 2: RCLASS_PRIME_CLASSEXT_PRIME_WRITABLE * This module's prime classext is the only classext and writable from any namespaces. * If unset, the prime classext is writable only from the root namespace. @@ -71,6 +71,8 @@ * Module has been initialized. * 4: RCLASS_NAMESPACEABLE * Is a builtin class that may be namespaced. It larger than a normal class. + * 5: RMODULE_IS_REFINEMENT + * Module is used for refinements. */ #define METACLASS_OF(k) RBASIC(k)->klass |
