diff options
| author | NARUSE, Yui <naruse@airemix.jp> | 2023-03-22 10:34:12 +0900 |
|---|---|---|
| committer | NARUSE, Yui <naruse@airemix.jp> | 2023-03-22 10:34:12 +0900 |
| commit | ad6fe84dfa6935bd6e2c3ef3ee36bed4e8627d0b (patch) | |
| tree | b8c2409b52415dd9dfdd00b8d997ff161553b79f /test/ruby | |
| parent | 4b4087dce318570f9f9c05e14900325b499fb632 (diff) | |
merge revision(s) dddc542e9b61b292d80a96d0d0efbbf58719e3be: [Backport #19476]
[Bug #19476]: correct cache index computation for repetition (#7457)
---
regexec.c | 4 ++--
test/ruby/test_regexp.rb | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_regexp.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 01f767dd89..ccdd289dcb 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1792,6 +1792,11 @@ class TestRegexp < Test::Unit::TestCase end; end + def test_bug_19476 # [Bug #19476] + assert_equal("123456789".match(/(?:x?\dx?){2,10}/)[0], "123456789") + assert_equal("123456789".match(/(?:x?\dx?){2,}/)[0], "123456789") + end + def test_linear_time_p assert_send [Regexp, :linear_time?, /a/] assert_send [Regexp, :linear_time?, 'a'] |
