This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
re/regexp_unicode_prop.t: Fix loop statement
authorKarl Williamson <khw@cpan.org>
Tue, 1 Mar 2016 04:12:59 +0000 (21:12 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 1 Mar 2016 04:47:55 +0000 (21:47 -0700)
This was doing an extra shift, which doesn't matter currently because
there's only one element in the array, but could cause future problems.

t/re/regexp_unicode_prop.t

index f6360e1..1544482 100644 (file)
@@ -272,7 +272,7 @@ sub run_tests {
     }
 
     print "# User-defined properties with /i differences\n";
-    foreach my $class (shift @USER_CASELESS_PROPERTIES) {
+    while (my $class = shift @USER_CASELESS_PROPERTIES) {
         my $chars_ref = shift @USER_CASELESS_PROPERTIES;
         my @in      =                       grep {!/^!./} @$chars_ref;
         my @out     = map {s/^!(?=.)//; $_} grep { /^!./} @$chars_ref;