summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 40c5b1471f..da4a0b585d 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -200,15 +200,16 @@ class TestGc < Test::Unit::TestCase
def test_expand_heap
assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'eom'
- base_length = GC.stat[:heap_length]
- (base_length * 500).times{ 'a' }
GC.start
- assert_equal base_length, GC.stat[:heap_length], "invalid heap expanding"
+ base_length = GC.stat[:heap_eden_page_length]
+ (base_length * 500).times{ 'a'; nil }
+ GC.start
+ assert_equal base_length, GC.stat[:heap_eden_page_length], "invalid heap expanding"
a = []
- (base_length * 500).times{ a << 'a' }
+ (base_length * 500).times{ a << 'a'; nil }
GC.start
- assert base_length < GC.stat[:heap_length]
+ assert base_length < GC.stat[:heap_eden_page_length]
eom
end
end