diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 7f2db199ad..b38c52ef2e 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -701,11 +701,11 @@ class TestRubyOptimization < Test::Unit::TestCase def test_block_parameter_should_not_create_objects assert_separately [], <<-END - # def foo &b end h1 = {}; h2 = {} ObjectSpace.count_objects(h1) # rehearsal + GC.start; GC.disable # to disable GC while foo{} ObjectSpace.count_objects(h1) foo{} ObjectSpace.count_objects(h2)