From: Eric Wong <e@80x24.org>
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 [thread overview]
Message-ID: <20160730233311.26610-1-e@80x24.org> (raw)
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
reply other threads:[~2016-07-30 23:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160730233311.26610-1-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).