aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-06-09 15:52:25 +0900
committerKoichi Sasada <ko1@atdot.net>2020-06-09 15:52:25 +0900
commit195075e8f5f2220a0a1f00f5cfd2ad98681e71d5 (patch)
tree3d88ab4626b3cd89a4711b1bc93b8bb44cbd5779
parent366646c15e841c7a5e4fa9f85abf4b7afa871e21 (diff)
downloadruby-195075e8f5f2220a0a1f00f5cfd2ad98681e71d5.tar.gz
disable GC on a test
CI fails with GC while `foo{}`, so that disable GC for this script.
-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)