aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_gc.rb
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-01 01:00:40 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-01 01:00:40 +0000
commit3d2451d99651a0f0a3c1ecd2c12b5a1264b4b6b9 (patch)
treebc05eda230b0735385d863e30e56dce03567dfab /test/ruby/test_gc.rb
parent0003d051dd161d26e4df67313de912e89479c2d5 (diff)
downloadruby-3d2451d99651a0f0a3c1ecd2c12b5a1264b4b6b9.tar.gz
* gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS. [ruby-core:39777] [Bug #5380] * test/ruby/test_gc.rb (test_gc_parameter): add test for it. * test/ruby/envutil.rb (assert_normal_exit): add :child_env option to enable pass environemnt variables to child process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r--test/ruby/test_gc.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 32b6e9f481..b294c5445e 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -1,5 +1,7 @@
require 'test/unit'
+require_relative "envutil"
+
class TestGc < Test::Unit::TestCase
class S
def initialize(a)
@@ -78,4 +80,12 @@ class TestGc < Test::Unit::TestCase
ensure
GC.stress = prev_stress
end
+
+ def test_gc_parameter
+ env = {
+ "RUBY_GC_MALLOC_LIMIT" => "60000000",
+ "RUBY_HEAP_MIN_SLOTS" => "100000"
+ }
+ assert_normal_exit("1", "[ruby-core:39777]", :child_env => env)
+ end
end