diff options
author | Peter Zhu <peter@peterzhu.ca> | 2021-11-17 09:07:47 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2021-11-17 13:20:31 -0500 |
commit | 1454906d4e730312b175197182cf85581821ed5e (patch) | |
tree | a9cdd3db8acfc761316543ff85d9665f31993949 | |
parent | 6764256dc7e768582f52aa8bee274815bc5f318c (diff) |
Add tests for cme NULL crash
Tests for GitHub PR #5122. Originally in GitHub PR #5121.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5132
-rw-r--r-- | test/ruby/test_super.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index 3afde9b0e3..6a575b88c5 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -549,7 +549,13 @@ class TestSuper < Test::Unit::TestCase o = b.new o.danger! - 2.times { o.missing rescue NoMethodError } + begin + original_gc_stress = GC.stress + GC.stress = true + 2.times { o.missing rescue NoMethodError } + ensure + GC.stress = original_gc_stress + end end def test_from_eval |