From: Dave Mitchell Date: Mon, 10 Sep 2007 14:04:40 +0000 (+0000) Subject: silence warning in new state.t test (spotted by Jerry Hedden) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c23d26f1e11019054656e6c9c69399fc01735c9a;p=p5sagit%2Fp5-mst-13.2.git silence warning in new state.t test (spotted by Jerry Hedden) p4raw-id: //depot/perl@31840 --- diff --git a/t/op/state.t b/t/op/state.t index 1c4fc8c..411ffaa 100644 --- a/t/op/state.t +++ b/t/op/state.t @@ -338,7 +338,7 @@ foreach my $spam (@spam) { { my $x; # used to force a closure my @f; - push @f, sub { $x; state $s = $_[0]; $s } for 1..2; + push @f, sub { $x=0; state $s = $_[0]; $s } for 1..2; is $f[0]->(1), 1; is $f[0]->(2), 1; is $f[1]->(3), 3;