diff options
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 800fa346c2..28d2dc9be1 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -251,8 +251,8 @@ class TestGc < Test::Unit::TestCase base_length = GC.stat[:heap_eden_page_length] (base_length * 500).times{ 'a' } GC.start - assert((base_length-1 .. base_length+1) === (v = GC.stat[:heap_eden_page_length]), - "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_page_length]: #{v}") + assert_in_delta base_length, GC.stat[:heap_eden_page_length], 1, + "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_page_length]: #{v})") a = [] (base_length * 500).times{ a << 'a'; nil } |