Skip to content

Commit

Permalink
PATCH: [gh #17185] Improper 'unescaped lbrace' msg
Browse files Browse the repository at this point in the history
This warning is simply deleted.  The possible places where an unescaped
left brace is illegal has been scaled back to avoid breaking more
existing code, and this context will remain legal.
  • Loading branch information
khwilliamson committed Nov 12, 2019
1 parent 3e15256 commit be45a1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 1 addition & 11 deletions regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11938,16 +11938,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
goto parse_rest;
} /* end switch */
}
else {
if (*RExC_parse == '{') {
ckWARNregdep(RExC_parse + 1,
"Unescaped left brace in regex is "
"deprecated here (and will be fatal "
"in Perl 5.32), passed through");
}
/* Not bothering to indent here, as the above 'else' is temporary
* */
if (!(RExC_flags & RXf_PMf_NOCAPTURE)) { /* (...) */
else if (!(RExC_flags & RXf_PMf_NOCAPTURE)) { /* (...) */
capturing_parens:
parno = RExC_npar;
RExC_npar++;
Expand Down Expand Up @@ -12014,7 +12005,6 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
/* with RXf_PMf_NOCAPTURE treat (...) as (?:...) */
paren = ':';
ret = 0;
}
}
}
else /* ! paren */
Expand Down
1 change: 0 additions & 1 deletion t/re/reg_mesg.t
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ my @deprecated = (
'/^{/' => "",
'/foo|{/' => "",
'/foo|^{/' => "",
'/foo({bar)/' => 'Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through {#} m/foo({{#}bar)/',
'/foo(:?{bar)/' => "",
'/\s*{/' => "",
'/a{3,4}{/' => "",
Expand Down

0 comments on commit be45a1e

Please sign in to comment.