diff options
| author | NARUSE, Yui <naruse@airemix.jp> | 2023-03-20 15:06:34 +0900 |
|---|---|---|
| committer | NARUSE, Yui <naruse@airemix.jp> | 2023-03-20 15:06:34 +0900 |
| commit | 4b4087dce318570f9f9c05e14900325b499fb632 (patch) | |
| tree | 54137d08ba210c461461de9b401c4fe10cfaf88b /test/ruby | |
| parent | 0555303464f3595223ec8093146041f96595865d (diff) | |
merge revision(s) e22c4e8877677ff90805e4a4dcbdef80f4220136: [Backport #19467]
[Bug #19467] correct cache points and counting failure on
`OP_ANYCHAR_STAR_PEEK_NEXT` (#7454)
---
regexec.c | 20 ++++++++++++++++----
test/ruby/test_regexp.rb | 10 ++++++++++
2 files changed, 26 insertions(+), 4 deletions(-)
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_regexp.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index c871580aeb..01f767dd89 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1782,6 +1782,16 @@ class TestRegexp < Test::Unit::TestCase assert_equal("10:0:0".match(pattern)[0], "10:0:0") end + def test_bug_19467 + assert_separately([], "#{<<-"begin;"}\n#{<<-'end;'}") + timeout = #{ EnvUtil.apply_timeout_scale(10).inspect } + begin; + Regexp.timeout = timeout + + assert_nil(/\A.*a.*z\z/ =~ "a" * 1000000 + "y") + end; + end + def test_linear_time_p assert_send [Regexp, :linear_time?, /a/] assert_send [Regexp, :linear_time?, 'a'] |
