diff options
author | Matt Valentine-House <[email protected]> | 2024-10-08 12:16:14 +0100 |
---|---|---|
committer | Matt Valentine-House <[email protected]> | 2024-11-14 10:46:36 +0000 |
commit | fa10441981c89deec914ba243360b40c5aede6ed (patch) | |
tree | 7ccc18e86359840d8ccac77c92f26f6f2f52f054 /gc/default.c | |
parent | 8a4ce4e9a9245c67f5b2b3c360c1400a16ad2c58 (diff) |
Expose GC.config[:implementation], to query the currently active GC
And a default and readonly key to the GC.config hash that names the
current GC implementation.
This is provided by each implementation by the API function
rb_gc_impl_active_gc_name
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11872
Diffstat (limited to 'gc/default.c')
-rw-r--r-- | gc/default.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gc/default.c b/gc/default.c index 910526d5d4..c2620e48bb 100644 --- a/gc/default.c +++ b/gc/default.c @@ -6156,6 +6156,12 @@ rb_gc_impl_copy_attributes(void *objspace_ptr, VALUE dest, VALUE obj) rb_gc_impl_copy_finalizer(objspace, dest, obj); } +const char * +rb_gc_impl_active_gc_name(void) +{ + return "default"; +} + void rb_gc_impl_writebarrier_remember(void *objspace_ptr, VALUE obj) { |