summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2021-06-18 17:32:13 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:39 -0400
commit3edf29668ee2f8015d560508accbb35c85568823 (patch)
tree929d5942e0aef7d3dce105c6c445d18532482a8f /test/ruby
parent595fdf8d669da043fd0ca4bed7cb0c593595a80c (diff)
Add opt_regexpmatch2
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_yjit.rb10
1 files changed, 10 insertions, 0 deletions
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