aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_optimization.rb2
1 files changed, 1 insertions, 1 deletions
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)