In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/b3c0965f4a61dac1e69879022077c1bfb96a805a?hp=f71f472facac5b530b24a8ff8a79a629776411e0>

- Log -----------------------------------------------------------------
commit b3c0965f4a61dac1e69879022077c1bfb96a805a
Author: George Greer <[email protected]>
Date:   Sun Jul 4 19:15:06 2010 -0400

    RT#75762: In CURLYX->CURLYM optimization, check before removing parentheses.
-----------------------------------------------------------------------

Summary of changes:
 regcomp.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/regcomp.c b/regcomp.c
index 1b22d90..1cc2e10 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3316,12 +3316,10 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode 
**scanp,
                        nxt = nxt2;
                    OP(nxt2)  = SUCCEED; /* Whas WHILEM */
                    /* Need to optimize away parenths. */
-                   if (data->flags & SF_IN_PAR) {
+                   if ((data->flags & SF_IN_PAR) && OP(nxt) == CLOSE) {
                        /* Set the parenth number.  */
                        regnode *nxt1 = NEXTOPER(oscan) + EXTRA_STEP_2ARGS; /* 
OPEN*/
 
-                       if (OP(nxt) != CLOSE)
-                           FAIL("Panic opt close");
                        oscan->flags = (U8)ARG(nxt);
                        if (RExC_open_parens) {
                            RExC_open_parens[ARG(nxt1)-1]=oscan; 
/*open->CURLYM*/

--
Perl5 Master Repository

Reply via email to