]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Prevent double ... at the end of a suppression
authorVincent Pit <perl@profvince.com>
Fri, 29 Jul 2016 15:43:47 +0000 (12:43 -0300)
committerVincent Pit <perl@profvince.com>
Fri, 29 Jul 2016 15:43:47 +0000 (12:43 -0300)
lib/Test/Valgrind/Suppressions.pm

index ee24383d71d0189e215aa534571dd0e9c1b39fc4..f5f576a676f71b6a8b1b53017c5d4884fafe89a0 100644 (file)
@@ -117,7 +117,7 @@ sub maybe_generalize {
  # With valgrind 3.4.0, we can replace unknown series of frames by '...'
  if ($sess->version >= '3.4.0') {
   $supp .= "...\n";
-  $supp =~ s/(?:^\s*(?:\.{3}|\*:\S*|obj:\*)\s*\n)+/...\n/mg;
+  $supp =~ s/(?:^\s*(?:\.{3}|\*:\S*|obj:\*)\s*(?:\n|\z))+/...\n/mg;
  }
 
  $supp;