]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/config_limiter: fix check for identical Git object
authorEric Wong <e@80x24.org>
Sat, 30 Jul 2016 23:33:11 +0000 (23:33 +0000)
committerEric Wong <e@80x24.org>
Sat, 30 Jul 2016 23:33:30 +0000 (23:33 +0000)
If we completely undef an object, it is likely possible
to have the same scalar address as the original object
even if they are different.  So keep the same object
around and only force creation of the same reference.
Tested on Perl 5.14.2 on Debian 7.x wheezy.

t/config_limiter.t

index bfea151096c9c2fe502120e0b14318247ae80ce7..3c7ec557f2bbc617b825bce2c0c93a8c1c9da43e 100644 (file)
@@ -17,7 +17,6 @@ my $cfgpfx = "publicinbox.test";
        my $lim = $git->{-httpbackend_limiter};
        ok($lim, 'Limiter exists');
        is($lim->{max}, 12, 'limiter has expected slots');
-       $git = undef;
        $ibx->{git} = undef;
        $git = $ibx->git;
        isnt($old, "$git", 'got new Git object');