diff options
author | Karl Williamson <khw@cpan.org> | 2019-01-30 15:00:30 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-02-04 21:00:49 -0700 |
commit | 813cfad2cc5a494533659beaa4833ff222b4e131 (patch) | |
tree | a64efaa303ceed2e3a9f6c22724fe62adc77b537 | |
parent | a1f354d3762aa87a796bc3d383629bfc853472f5 (diff) | |
download | perl-813cfad2cc5a494533659beaa4833ff222b4e131.tar.gz |
regcomp.c: Fix recent optimization of [...] bug
This bug was introduced in b2296192536090829ba6d2cb367456f4e346dcc6
n 5.29.7. Using /il should not result in looking for a [:posix:] class
that matches the code points given.
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | t/re/anyof.t | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -18815,7 +18815,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, } } - if (! posixl) { + if (! (anyof_flags & ANYOF_LOCALE_FLAGS)) { PERL_UINT_FAST8_T type; SV * intersection = NULL; SV* d_invlist = NULL; diff --git a/t/re/anyof.t b/t/re/anyof.t index ad0a2d9ada..32e0bae9ad 100644 --- a/t/re/anyof.t +++ b/t/re/anyof.t @@ -462,6 +462,7 @@ my @tests = ( '(?l:[\x{212A}])' => 'ANYOFL[212A]', '(?l:[\s\x{212A}])' => 'ANYOFPOSIXL[\s][1680 2000-200A 2028-2029 202F 205F 212A 3000]', '(?l:[^\S\x{202F}])' => 'ANYOFPOSIXL[^\\S][1680 2000-200A 2028-2029 205F 3000]', + '(?li:[a-z])' => 'ANYOFL{i}[a-z{utf8 locale}A-Z\x{017F}\x{212A}]', '\p{All}' => 'SANY', '\P{All}' => 'OPFAIL', |