From c09e5ad17debdddfad872d0b2a7237dba83dff17 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 29 Feb 2024 17:15:06 +0100 Subject: Clarify C API documentation about pinned classes They are not only pinned, but also immortal. Even if the constant referencing them is removed, they will remain alive. It's a precision worth noting. --- include/ruby/internal/intern/class.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/ruby/internal/intern/class.h') diff --git a/include/ruby/internal/intern/class.h b/include/ruby/internal/intern/class.h index 0fb2d001bc..357af5d176 100644 --- a/include/ruby/internal/intern/class.h +++ b/include/ruby/internal/intern/class.h @@ -88,8 +88,8 @@ VALUE rb_define_class_id(ID id, VALUE super); * @post `outer::id` refers the returned class. * @note If a class named `id` is already defined and its superclass is * `super`, the function just returns the defined class. - * @note The compaction GC does not move classes returned by this - * function. + * @note The GC does not collect nor move classes returned by this + * function. They are immortal. */ VALUE rb_define_class_id_under(VALUE outer, ID id, VALUE super); @@ -127,8 +127,8 @@ VALUE rb_define_module_id(ID id); * constant is not a module. * @return The created module. * @post `outer::id` refers the returned module. - * @note The compaction GC does not move classes returned by this - * function. + * @note The GC does not collect nor move classes returned by this + * function. They are immortal. */ VALUE rb_define_module_id_under(VALUE outer, ID id); -- cgit v1.2.3