In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/9a7bb2f73a8a1b561890191974201d576371e7f9?hp=a0bd1a30d379f2625c307657d63fc50173d7a56d>

- Log -----------------------------------------------------------------
commit 9a7bb2f73a8a1b561890191974201d576371e7f9
Author: Karl Williamson <[email protected]>
Date:   Mon Aug 24 12:50:47 2015 -0600

    PATCH: [perl 125825] {n}+ possessive quantifier broken
    
    I was unaware of this construct when I wrote the commit that broke it,
    and there were no tests for it.  Now there are.

M       pod/perldelta.pod
M       regcomp.c
M       t/re/re_tests
M       t/re/reg_mesg.t

commit e7bc593485cfd538614dec2ab351c68f94c75c39
Author: Karl Williamson <[email protected]>
Date:   Mon Aug 24 13:35:52 2015 -0600

    Further clarification to [perl #125805] perldelta

M       pod/perldelta.pod
-----------------------------------------------------------------------

Summary of changes:
 pod/perldelta.pod | 9 ++++++++-
 regcomp.c         | 4 +---
 t/re/re_tests     | 2 ++
 t/re/reg_mesg.t   | 1 -
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index aafbd1c..c91c981 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -347,9 +347,16 @@ files in F<ext/> and F<lib/> are best summarized in 
L</Modules and Pragmata>.
 
 =item *
 
-C<(?[ () ])> no longer segfaults, giving a syntax error message instead.
+C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
 [perl #125805]
 
+=item *
+
+Regular expression possesive quantifier v5.20 regression now fixed.
+C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically
+to C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>.  Since v5.20, this didn't
+work if I<min> and I<max> were equal.  [perl #125825]
+
 =back
 
 =head1 Known Problems
diff --git a/regcomp.c b/regcomp.c
index 91e1603..982fdd1 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10894,9 +10894,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, 
U32 depth)
                 ret = reg_node(pRExC_state, OPFAIL);
                 return ret;
             }
-            else if (min == max
-                     && RExC_parse < RExC_end
-                     && (*RExC_parse == '?' || *RExC_parse == '+'))
+            else if (min == max && RExC_parse < RExC_end && *RExC_parse == '?')
             {
                 if (PASS2) {
                     ckWARN2reg(RExC_parse + 1,
diff --git a/t/re/re_tests b/t/re/re_tests
index 6674a2a..9d5fa73 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1924,5 +1924,7 @@ A+(*PRUNE)BC(?{}) AAABC   y       $&      AAABC
 /w\zxy?\z/i    \x{100}a\x{80}a n       -       -
 /w\z\R\z/i     \x{100}a\x{80}a n       -       -
 
+/(a+){1}+a/    aaa     n       -       -               # [perl #125825]
+
 # Keep these lines at the end of the file
 # vim: softtabstop=0 noexpandtab
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index d9d9d74..dd82949 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -504,7 +504,6 @@ my @warning = (
                     'Useless (?c) - use /gc modifier {#} m/(?ogc{#})\x{100}/',
                   ],
     '/a{1,1}?\x{100}/' => 'Useless use of greediness modifier \'?\' {#} 
m/a{1,1}?{#}\x{100}/',
-    '/b{3}  +\x{100}/x' => 'Useless use of greediness modifier \'+\' {#} 
m/b{3}  +{#}\x{100}/',
     "/(?[ [ % - % ] ])/" => "",
     "/(?[ [ : - \\x$colon_hex ] ])\\x{100}/" => "\": - \\x$colon_hex \" is 
more clearly written simply as \":\" {#} m/(?[ [ : - \\x$colon_hex {#}] 
])\\x{100}/",
     "/(?[ [ \\x$colon_hex - : ] ])\\x{100}/" => "\"\\x$colon_hex\ - : \" is 
more clearly written simply as \":\" {#} m/(?[ [ \\x$colon_hex - : {#}] 
])\\x{100}/",

--
Perl5 Master Repository

Reply via email to