summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc.rb
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-08 10:26:50 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-08 10:26:50 +0000
commit0accf1fbeced2530d2428b750a3c37e797c1745a (patch)
tree3361aaf3e1dfb7dece61932041f666b40a59276d /test/ruby/test_gc.rb
parentcc2394638044c083269037aeb133e17b14a896ac (diff)
merge revision(s) 33368:
* 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/branches/ruby_1_9_3@33432 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