diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 2a7c1b507fb16b..0f4a13211e035f 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -257,7 +257,6 @@ def test_latest_gc_info_need_major_by assert_nil GC.latest_gc_info(:need_major_by) # allocate objects until need_major_by is set or major GC happens - major_count = GC.stat(:major_gc_count) objects = [] while GC.latest_gc_info(:need_major_by).nil? objects.append(100.times.map { '*' })