diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_jit.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index b1bef2a7b7..669dcf56e6 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -609,6 +609,17 @@ class TestJIT < Test::Unit::TestCase assert_eval_with_jit('print "\x00".unpack("c")', stdout: '[0]', success_count: 1) end + def test_compile_insn_checkmatch + assert_compile_once("#{<<~"begin;"}\n#{<<~"end;"}", result_inspect: '"world"', insns: %i[checkmatch]) + begin; + ary = %w(hello good-bye) + case 'hello' + when *ary + 'world' + end + end; + end + def test_jit_output out, err = eval_with_jit('5.times { puts "MJIT" }', verbose: 1, min_calls: 5) assert_equal("MJIT\n" * 5, out) |