Skip to content

Commit

Permalink
Turn off GC.stress for 'require' in Ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
qnighy committed Apr 23, 2020
1 parent 9e48c9f commit d95f630
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ruby/tests/gc_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit d95f630

Please sign in to comment.