From 4d77803a66f1bc8559094fd44716fc3bdc16dc5b Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Thu, 11 Jul 2024 16:10:20 +0100 Subject: [PATCH] Rename full_mark -> rgengc_allow_full_mark --- gc/default.c | 4 ++-- test/ruby/test_gc.rb | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gc/default.c b/gc/default.c index 2fd86c6da5..8614db982a 100644 --- a/gc/default.c +++ b/gc/default.c @@ -8072,7 +8072,7 @@ rb_gc_impl_config_get(void *objspace_ptr) rb_objspace_t *objspace = objspace_ptr; VALUE hash = rb_hash_new(); - rb_hash_aset(hash, sym("full_mark"), RBOOL(gc_config_full_mark_val)); + rb_hash_aset(hash, sym("rgengc_allow_full_mark"), RBOOL(gc_config_full_mark_val)); return hash; } @@ -8081,7 +8081,7 @@ static int gc_config_set_key(st_data_t key, st_data_t value, st_data_t data) { rb_objspace_t *objspace = (rb_objspace_t *)data; - if (!strcmp(rb_str_to_cstr(rb_sym2str(key)), "full_mark")) { + if (!strcmp(rb_str_to_cstr(rb_sym2str(key)), "rgengc_allow_full_mark")) { gc_rest(objspace); gc_config_full_mark_set(RBOOL(value)); } diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 4ee8a20a3c..f47f1e282a 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -57,7 +57,7 @@ class TestGc < Test::Unit::TestCase config = GC.config assert_not_empty(config) - assert_true(config[:full_mark]) + assert_true(config[:rgengc_allow_full_mark]) end def test_gc_config_invalid_args @@ -69,13 +69,13 @@ class TestGc < Test::Unit::TestCase def test_gc_config_setting_returns_updated_config_hash omit "unsupoported platform/GC" unless defined?(GC.config) - old_value = GC.config[:full_mark] + old_value = GC.config[:rgengc_allow_full_mark] assert_true(old_value) - new_value = GC.config(full_mark: false)[:full_mark] + new_value = GC.config(rgengc_allow_full_mark: false)[:rgengc_allow_full_mark] assert_false(new_value) ensure - GC.config(full_mark: true) + GC.config(rgengc_allow_full_mark: true) GC.start end @@ -95,7 +95,7 @@ class TestGc < Test::Unit::TestCase GC.enable GC.start - GC.config(full_mark: false) + GC.config(rgengc_allow_full_mark: false) major_count = GC.stat[:major_gc_count] minor_count = GC.stat[:minor_gc_count] @@ -109,7 +109,7 @@ class TestGc < Test::Unit::TestCase assert_operator(minor_count, :<=, GC.stat[:minor_gc_count]) assert_nil(GC.start) ensure - GC.config(full_mark: true) + GC.config(rgengc_allow_full_mark: true) GC.start end