From: Vincent Pit Date: Fri, 29 Jul 2016 15:43:47 +0000 (-0300) Subject: Prevent double ... at the end of a suppression X-Git-Tag: v1.19~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=9ec6f49f668f2c97827213fb0b6566d7eb764a15;p=perl%2Fmodules%2FTest-Valgrind.git Prevent double ... at the end of a suppression --- diff --git a/lib/Test/Valgrind/Suppressions.pm b/lib/Test/Valgrind/Suppressions.pm index ee24383..f5f576a 100644 --- a/lib/Test/Valgrind/Suppressions.pm +++ b/lib/Test/Valgrind/Suppressions.pm @@ -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;