From d95f6302b06158ec47895cdc8aa0e557383eb117 Mon Sep 17 00:00:00 2001 From: Masaki Hara Date: Thu, 23 Apr 2020 10:10:39 +0900 Subject: [PATCH] Turn off GC.stress for 'require' in Ruby 2.7 --- ruby/tests/gc_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruby/tests/gc_test.rb b/ruby/tests/gc_test.rb index 55b96289e812..6ef4e2e301ed 100755 --- a/ruby/tests/gc_test.rb +++ b/ruby/tests/gc_test.rb @@ -4,7 +4,9 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) old_gc = GC.stress -GC.stress = 0x01 | 0x04 +# Ruby 2.7.0 - 2.7.1 has a GC bug in its parser, so turn off stress for now +# See https://bugs.ruby-lang.org/issues/16807 +GC.stress = 0x01 | 0x04 unless RUBY_VERSION.match?(/^2\.7\./) require 'generated_code_pb' require 'generated_code_proto2_pb' GC.stress = old_gc