From 2f7ca893a35abcde7e994c582055bd672c459058 Mon Sep 17 00:00:00 2001 From: nari Date: Wed, 13 Mar 2013 14:52:00 +0000 Subject: * gc.c: allow to tune growth of heap by environment variable RUBY_HEAP_SLOTS_GROWTH_FACTOR. patched by tmm1(Aman Gupta). [Feature #8015] [ruby-core:53131] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_gc.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 793ef3918e..bed58f3830 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -108,6 +108,12 @@ 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"], "", [], /heap_min_slots=100000/, "[ruby-core:39795]") + + env = { + "RUBY_HEAP_SLOTS_GROWTH_FACTOR" => "2.0" + } + assert_normal_exit("exit", "", :child_env => env) + assert_in_out_err([env, "-w", "-e", "exit"], "", [], /heap_slots_growth_factor=2.0/, "") end def test_profiler_enabled -- cgit v1.2.3