From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.4 required=3.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E17636338FD for ; Mon, 15 Jun 2015 19:22:50 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH] test/helper: warn atomically Date: Mon, 15 Jun 2015 19:22:50 +0000 Message-Id: <1434396170-1560-1-git-send-email-e@80x24.org> List-Id: We want to avoid race conditions if tests become multithreaded from Kernel#warn internally issuing a second write. --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 7b8c1aa..c86f3e3 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -140,7 +140,7 @@ class DieIfUsed end def close - warn "INFO #$$ closed DieIfUsed #{@@n += 1}" + warn "INFO #$$ closed DieIfUsed #{@@n += 1}\n" end end -- EW