]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/thread-cycle.t
thread: avoid Perl5 internal scratchpad target cache
[public-inbox.git] / t / thread-cycle.t
index e89b18464a5f55335c63320b33e9c172e65f3f79..1e5dfb51ab47a2865f9ab7835eda154291a5e65e 100644 (file)
@@ -108,7 +108,7 @@ SKIP: {
        eval 'package EmptyInbox; sub smsg_by_mid { undef }';
        my $ctx = { ibx => bless {}, 'EmptyInbox' };
        my $rootset = PublicInbox::SearchThread::thread($smsgs, sub {
-               [ sort { $a->{mid} cmp $b->{mid} } @{$_[0]} ] }, $ctx);
+               @{$_[0]} = sort { $a->{mid} cmp $b->{mid} } @{$_[0]} }, $ctx);
        my $oldout = select $fh;
        find_cycle($rootset);
        select $oldout;
@@ -120,7 +120,7 @@ done_testing;
 sub thread_to_s {
        my ($msgs) = @_;
        my $rootset = PublicInbox::SearchThread::thread($msgs, sub {
-               [ sort { $a->{mid} cmp $b->{mid} } @{$_[0]} ] });
+               @{$_[0]} = sort { $a->{mid} cmp $b->{mid} } @{$_[0]} });
        my $st = '';
        my @q = map { (0, $_) } @$rootset;
        while (@q) {