In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/b1d21918e268271d791ff30e83cf9c4f8c351707?hp=abb9aadc729e283764df9f7ac23799e957287bc7>
- Log ----------------------------------------------------------------- commit b1d21918e268271d791ff30e83cf9c4f8c351707 Author: Karl Williamson <k...@cpan.org> Date: Sat Jun 30 15:17:51 2018 -0600 PATCH: [perl #133311] BBC GRANTM/Encoding-FixLatin This effectively reverts a portion of a74bb78e4469c9f5ea806b57b155df6265d07975. I got confused when I wrote that commit, and conflated ASCII and POSIX regnodes. ----------------------------------------------------------------------- Summary of changes: regcomp.c | 11 +++++++++-- t/re/re_tests | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/regcomp.c b/regcomp.c index f0ade29a6e..b0531608c2 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5613,12 +5613,19 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n", break; case NASCII: - case NPOSIXA: /* For these, we always know the exact set of - what's matched */ invert = 1; /* FALLTHROUGH */ case ASCII: + my_invlist = invlist_clone(PL_Posix_ptrs[_CC_ASCII]); + + /* This can be handled as a Posix class */ + goto join_posix_and_ascii; + + case NPOSIXA: /* For these, we always know the exact set of + what's matched */ + /* FALLTHROUGH */ case POSIXA: + assert(FLAGS(scan) != _CC_ASCII); my_invlist = invlist_clone(PL_Posix_ptrs[FLAGS(scan)]); goto join_posix_and_ascii; diff --git a/t/re/re_tests b/t/re/re_tests index 3fd24ff572..4043d12c24 100644 --- a/t/re/re_tests +++ b/t/re/re_tests @@ -1992,6 +1992,7 @@ AB\s+\x{100} AB \x{100}X y - - /\A\x80+\z/ \x80\x80\x80\x80\x80\x80\x80\x80\x80 y $& \x80\x80\x80\x80\x80\x80\x80\x80\x80 # [perl #132900] ^(\d+)*?4X$ 1234X y $1 123 # perl #131648 (?il)\x{100}|\x{100}|\x{FE} \xFE y $& \xFE +\A([\x00-\x7F]+)(.*)\z \007\011\012 y $& \007\011\012 # [perl #133311] # Keep these lines at the end of the file -- Perl5 Master Repository