diff options
author | TSUYUSATO Kitsune <[email protected]> | 2023-03-13 15:46:41 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-13 15:46:41 +0900 |
commit | e22c4e8877677ff90805e4a4dcbdef80f4220136 (patch) | |
tree | cdfd0c7168e8ef682454715408baa84d6ded5b06 /test/ruby/test_regexp.rb | |
parent | ed269c81aa68ba87e9da2fe4c0c2227ea0689eca (diff) |
[Bug #19467] correct cache points and counting failure on `OP_ANYCHAR_STAR_PEEK_NEXT` (#7454)
Notes
Notes:
Merged-By: makenowjust <[email protected]>
Diffstat (limited to 'test/ruby/test_regexp.rb')
-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 ae2bf82bb8..2fc418d96f 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1755,6 +1755,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'] |