From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E65491F71B for ; Sat, 30 Jul 2016 23:33:11 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/config_limiter: fix check for identical Git object Date: Sat, 30 Jul 2016 23:33:11 +0000 Message-Id: <20160730233311.26610-1-e@80x24.org> List-Id: 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/t/config_limiter.t b/t/config_limiter.t index bfea151..3c7ec55 100644 --- a/t/config_limiter.t +++ b/t/config_limiter.t @@ -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'); -- EW