In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/1a7108fea1f14e60c0d69b29980183cf21288bef?hp=bc62bf8519f9005df2fb29dbd3d330202b258b6b>

- Log -----------------------------------------------------------------
commit 1a7108fea1f14e60c0d69b29980183cf21288bef
Author: Karl Williamson <[email protected]>
Date:   Thu Jun 27 11:09:43 2019 -0600

    PATCH: [perl #133996] reword diagnostic

-----------------------------------------------------------------------

Summary of changes:
 pod/perldelta.pod |  7 ++++++-
 pod/perldiag.pod  |  2 +-
 regcomp.c         |  2 +-
 t/re/reg_mesg.t   | 10 +++++-----
 4 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index d15509e332..dd5ea5c952 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -218,7 +218,12 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+C<\N{} here is restricted to one character> is now emitted in the same
+circumstances where previously C<\N{} in inverted character class or as
+a range end-point is restricted to one character> was.
+
+This is due to new circumstances having been added in perl v5.30 that
+weren't covered by the earlier wording.
 
 =back
 
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 325bfce50f..f9c023d148 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -4007,7 +4007,7 @@ bracketed character class, for the same reason that C<.> 
in a character
 class loses its specialness: it matches almost everything, which is
 probably not what you want.
 
-=item \N{} in inverted character class or as a range end-point is restricted 
to one character in regex; marked by <-- HERE in m/%s/
+=item \N{} here is restricted to one character in regex; marked by <-- HERE in 
m/%s/
 
 (F) Named Unicode character escapes (C<\N{...}>) may return a
 multi-character sequence.  Even though a character class is
diff --git a/regcomp.c b/regcomp.c
index fcde30dddf..9782f19f52 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -17020,7 +17020,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, 
U32 depth,
                                 {
                                     if (strict) {
                                         RExC_parse--;
-                                        vFAIL("\\N{} in inverted character 
class or as a range end-point is restricted to one character");
+                                        vFAIL("\\N{} here is restricted to one 
character");
                                     }
                                     ckWARNreg(RExC_parse, "Using just the 
first character returned by \\N{} in character class");
                                     break; /* <value> contains the first code
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index d10fa2c09a..9eb32ab30a 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -260,7 +260,7 @@ my @death =
  'm/(?[[\w-x]])/' => 'False [] range "\w-" {#} m/(?[[\w-{#}x]])/',
  'm/(?[[a-\pM]])/' => 'False [] range "a-\pM" {#} m/(?[[a-\pM{#}]])/',
  'm/(?[[\pM-x]])/' => 'False [] range "\pM-" {#} m/(?[[\pM-{#}x]])/',
- 'm/(?[[^\N{LATIN CAPITAL LETTER A WITH MACRON AND GRAVE}]])/' => '\N{} in 
inverted character class or as a range end-point is restricted to one character 
{#} m/(?[[^\N{U+100.300{#}}]])/',
+ 'm/(?[[^\N{LATIN CAPITAL LETTER A WITH MACRON AND GRAVE}]])/' => '\N{} here 
is restricted to one character {#} m/(?[[^\N{U+100.300{#}}]])/',
  'm/(?[ \p{Digit} & (?^(?[ \p{Thai} | \p{Lao} ]))])/' => 'Sequence (?^(...) 
not recognized {#} m/(?[ \p{Digit} & (?^({#}?[ \p{Thai} | \p{Lao} ]))])/',
  'm/(?[ \p{Digit} & (?(?[ \p{Thai} | \p{Lao} ]))])/' => 'Unexpected character 
{#} m/(?[ \p{Digit} & (?{#}(?[ \p{Thai} | \p{Lao} ]))])/',
  'm/\o{/' => 'Missing right brace on \o{ {#} m/\o{{#}/',
@@ -317,7 +317,7 @@ my @death =
  '/\p{Is_Other_Alphabetic=F}/ ' => 'Can\'t find Unicode property definition 
"Is_Other_Alphabetic=F" {#} m/\p{Is_Other_Alphabetic=F}{#}/',
  '/\p{Is_Other_Alphabetic=F}/ ' => 'Can\'t find Unicode property definition 
"Is_Other_Alphabetic=F" {#} m/\p{Is_Other_Alphabetic=F}{#}/',
  '/\x{100}(?(/' => 'Unknown switch condition (?(...)) {#} m/\\x{100}(?({#}/', 
# [perl #133896]
- '/(?[\N{KEYCAP DIGIT NINE}/' => '\N{} in inverted character class or as a 
range end-point is restricted to one character {#} 
m/(?[\\N{U+39.FE0F.20E3{#}}/', # [perl #133988]
+ '/(?[\N{KEYCAP DIGIT NINE}/' => '\N{} here is restricted to one character {#} 
m/(?[\\N{U+39.FE0F.20E3{#}}/', # [perl #133988]
  '/0000000000000000[\N{U+0.00}0000/' => 'Unmatched [ {#} 
m/0000000000000000[{#}\N{U+0.00}0000/', # [perl #134059]
 );
 
@@ -363,11 +363,11 @@ my @death_only_under_strict = (
     'm/[\pM-x]\x{100}/' => 'False [] range "\pM-" {#} m/[\pM-{#}x]\x{100}/',
                         => 'False [] range "\pM-" {#} m/[\pM-{#}x]\x{100}/',
     'm/[^\N{LATIN CAPITAL LETTER A WITH MACRON AND GRAVE}]/' => 'Using just 
the first character returned by \N{} in character class {#} 
m/[^\N{U+100.300}{#}]/',
-                                       => '\N{} in inverted character class or 
as a range end-point is restricted to one character {#} m/[^\N{U+100.300{#}}]/',
+                                       => '\N{} here is restricted to one 
character {#} m/[^\N{U+100.300{#}}]/',
     'm/[\x03-\N{LATIN CAPITAL LETTER A WITH MACRON AND GRAVE}]/' => 'Using 
just the first character returned by \N{} in character class {#} 
m/[\x03-\N{U+100.300}{#}]/',
-                                            => '\N{} in inverted character 
class or as a range end-point is restricted to one character {#} 
m/[\x03-\N{U+100.300{#}}]/',
+                                            => '\N{} here is restricted to one 
character {#} m/[\x03-\N{U+100.300{#}}]/',
     'm/[\N{LATIN CAPITAL LETTER A WITH MACRON AND GRAVE}-\x{10FFFF}]/' => 
'Using just the first character returned by \N{} in character class {#} 
m/[\N{U+100.300}{#}-\x{10FFFF}]/',
-                                                  => '\N{} in inverted 
character class or as a range end-point is restricted to one character {#} 
m/[\N{U+100.300{#}}-\x{10FFFF}]/',
+                                                  => '\N{} here is restricted 
to one character {#} m/[\N{U+100.300{#}}-\x{10FFFF}]/',
     '/[\08]/'   => '\'\08\' resolved to \'\o{0}8\' {#} m/[\08{#}]/',
                 => 'Need exactly 3 octal digits {#} m/[\08{#}]/',
     '/[\018]/'  => '\'\018\' resolved to \'\o{1}8\' {#} m/[\018{#}]/',

-- 
Perl5 Master Repository

Reply via email to