diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2025-06-06 22:01:04 +0900 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2025-06-09 22:36:53 +0900 |
| commit | b8922a8d45812a23927228ecc3f21ae9ef5255f2 (patch) | |
| tree | 5871fa294cb3bcf635f788e07bc2ac271677e846 /test/ruby/test_zjit.rb | |
| parent | ec1244cfd2f115485bffa78fc9d887c1b5c43dbe (diff) | |
ZJIT: Parse opt_regexpmatch2 into HIR
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13549
Diffstat (limited to 'test/ruby/test_zjit.rb')
| -rw-r--r-- | test/ruby/test_zjit.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index b158052ad4..47a9f6f7dc 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -240,6 +240,13 @@ class TestZJIT < Test::Unit::TestCase RUBY end + def test_opt_regexpmatch2 + assert_compiles('[1, nil]', <<~RUBY, insns: [:opt_regexpmatch2]) + def test(haystack) = /needle/ =~ haystack + return test("kneedle"), test("") + RUBY + end + def test_opt_ge assert_compiles '[false, true, true]', %q{ def test(a, b) = a >= b |
