diff options
| author | NARUSE, Yui <nurse@users.noreply.github.com> | 2024-02-01 16:13:50 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-01 07:13:50 +0000 |
| commit | 7231fc5baa0a44ef6264c795071c5fbec8d1102d (patch) | |
| tree | 697fb6e74df355f64e950ed55bd631cf02cf6310 /test | |
| parent | 57d8d6e58a13c9de7bb84c1c76625789f435bca1 (diff) | |
merge revision(s) 597955a,8b65d15: [Backport #20173] (#9794)
Fix to work match cache with peek next optimization (#9459)
---
regexec.c | 3 ++-
test/ruby/test_regexp.rb | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
Fix test case for `test_match_cache_with_peek_optimization` (#9466)
---
test/ruby/test_regexp.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_regexp.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 43357b0c64..91a9f0a96c 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1945,6 +1945,15 @@ class TestRegexp < Test::Unit::TestCase end; end + def test_match_cache_with_peek_optimization + assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}") + timeout = #{ EnvUtil.apply_timeout_scale(10).inspect } + begin; + Regexp.timeout = timeout + assert_nil(/a+z/ =~ "a" * 1000000 + "xz") + end; + end + def test_cache_opcodes_initialize str = 'test1-test2-test3-test4-test_5' re = '^([0-9a-zA-Z\-/]*){1,256}$' |
