diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-06-15 15:57:27 -0700 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-06-15 15:57:30 -0700 |
| commit | 5310147bb826424059f258b76b37bebdc0abbc63 (patch) | |
| tree | 71f92c2a85ec890b8454bbac33327ec29da12a32 /test/ruby | |
| parent | 1e8fed2d2a3c42e007c830648a5f6427b99283d0 (diff) | |
MJIT: Handle JIT failure properly
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_mjit.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_mjit.rb b/test/ruby/test_mjit.rb index 09503456e1..7fb984a024 100644 --- a/test/ruby/test_mjit.rb +++ b/test/ruby/test_mjit.rb @@ -1198,6 +1198,18 @@ class TestMJIT < Test::Unit::TestCase end end if defined?(fork) + def test_jit_failure + _, err = eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", min_calls: 1, verbose: 1) + begin; + 1.times do + class A + end + end + end; + assert_match(/^MJIT warning: .+ unsupported instruction: defineclass/, err) + assert_match(/^JIT failure: block in <main>/, err) + end + private # The shortest way to test one proc |
