From c01b17f7fc74f005f23da0405eb8bad08a269a18 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 31 Jul 2023 15:12:20 -0400 Subject: Fix default value of global_init_slots Not setting a value to global_init_slots causes get_envparam_size to output a broken default value. --- test/ruby/test_gc.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 8d315fa925..335fa77e93 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -345,6 +345,8 @@ class TestGc < Test::Unit::TestCase assert_in_out_err([env, "-W0", "-e", "exit"], "", [], [], "[ruby-core:39795]") assert_in_out_err([env, "-W1", "-e", "exit"], "", [], [], "[ruby-core:39795]") assert_in_out_err([env, "-w", "-e", "exit"], "", [], /RUBY_GC_HEAP_INIT_SLOTS=100000/, "[ruby-core:39795]") + # Value of GC_HEAP_INIT_SLOTS is 10000 + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /\(default value: 10000\)/) env = { "RUBY_GC_HEAP_GROWTH_FACTOR" => "2.0", -- cgit v1.2.3