From 3edf29668ee2f8015d560508accbb35c85568823 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Fri, 18 Jun 2021 17:32:13 -0700 Subject: Add opt_regexpmatch2 --- test/ruby/test_yjit.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index e485e5f64f..95e768ee0c 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -110,6 +110,16 @@ class TestYJIT < Test::Unit::TestCase RUBY end + def test_opt_regexpmatch2 + assert_compiles(<<~RUBY, insns: %i[opt_regexpmatch2], result: 0) + def foo(str) + str =~ /foo/ + end + + foo("foobar") + RUBY + end + def test_compile_opt_getinlinecache assert_compiles(<<~RUBY, insns: %i[opt_getinlinecache], result: 123, min_calls: 2) def get_foo -- cgit v1.2.3