summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2021-11-17 09:07:47 -0500
committerPeter Zhu <peter@peterzhu.ca>2021-11-17 13:20:31 -0500
commit1454906d4e730312b175197182cf85581821ed5e (patch)
treea9cdd3db8acfc761316543ff85d9665f31993949
parent6764256dc7e768582f52aa8bee274815bc5f318c (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.rb8
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