With change
a5b92898, negation started modifying numeric arguments,
causing problems for modules like Data::Float.
SV * const sv = TOPs;
const int flags = SvFLAGS(sv);
- if( looks_like_number( sv ) ){
+ if( !SvNIOK( sv ) && looks_like_number( sv ) ){
SvIV_please( sv );
}
}
# Tests that use test.pl start here.
-BEGIN { $::additional_tests = 3 }
+BEGIN { $::additional_tests = 4 }
curr_test($test);
ok(!-0.0, "neg zero is boolean false");
my $nz = -0.0; "$nz";
ok(!$nz, 'previously stringified -0.0 is boolean false');
+$nz = -0.0;
+is sprintf("%+.f", - -$nz), sprintf("%+.f", - -$nz),
+ "negation does not coerce negative zeroes";