Rename full_mark -> rgengc_allow_full_mark
This commit is contained in:
parent
f543c68e1c
commit
4d77803a66
@ -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));
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user