summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 8fc511331e..3967ed54bc 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -377,17 +377,17 @@ class TestGc < Test::Unit::TestCase
}
assert_in_out_err([env, "-W0", "-e", "exit"], "", [], [])
assert_in_out_err([env, "-W:deprecated", "-e", "exit"], "", [],
- /The environment variable RUBY_GC_HEAP_INIT_SLOTS is deprecated; use environment variables RUBY_GC_HEAP_INIT_SIZE_%d_SLOTS instead/)
+ /The environment variable RUBY_GC_HEAP_INIT_SLOTS is deprecated; use environment variables RUBY_GC_HEAP_%d_INIT_SLOTS instead/)
env = {}
- GC.stat_heap.each do |_, s|
- env["RUBY_GC_HEAP_INIT_SIZE_#{s[:slot_size]}_SLOTS"] = "200000"
+ GC.stat_heap.keys.each do |heap|
+ env["RUBY_GC_HEAP_#{heap}_INIT_SLOTS"] = "200000"
end
assert_normal_exit("exit", "", :child_env => env)
env = {}
- GC.stat_heap.each do |_, s|
- env["RUBY_GC_HEAP_INIT_SIZE_#{s[:slot_size]}_SLOTS"] = "0"
+ GC.stat_heap.keys.each do |heap|
+ env["RUBY_GC_HEAP_#{heap}_INIT_SLOTS"] = "0"
end
assert_normal_exit("exit", "", :child_env => env)
@@ -456,8 +456,8 @@ class TestGc < Test::Unit::TestCase
env = {}
# Make the heap big enough to ensure the heap never needs to grow.
sizes = GC.stat_heap.keys.reverse.map { |i| (i + 1) * 100_000 }
- GC.stat_heap.each do |i, s|
- env["RUBY_GC_HEAP_INIT_SIZE_#{s[:slot_size]}_SLOTS"] = sizes[i].to_s
+ GC.stat_heap.keys.each do |heap|
+ env["RUBY_GC_HEAP_#{heap}_INIT_SLOTS"] = sizes[heap].to_s
end
assert_separately([env, "-W0"], __FILE__, __LINE__, <<~RUBY)
SIZES = #{sizes}