From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SMmSAeeHjmBKuwAAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 13:07:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sJ7mOOaHjmD9KQAA1q6Kng (envelope-from ) for ; Sun, 02 May 2021 11:07:18 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 748AE2C791 for ; Sun, 2 May 2021 13:07:18 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6F96E271D4; Sun, 2 May 2021 07:07:15 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 2496D20017 for ; Sun, 2 May 2021 07:07:13 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 091F960016; Sun, 2 May 2021 07:07:12 -0400 (EDT) Received: (nullmailer pid 871725 invoked by uid 1000); Sun, 02 May 2021 11:07:12 -0000 From: David Bremner To: Felipe Contreras , notmuch@notmuchmail.org Subject: Re: [PATCH 7/9] test: ruby: use much more standard Ruby idioms In-Reply-To: <20210501115923.483816-8-felipe.contreras@gmail.com> References: <20210501115923.483816-1-felipe.contreras@gmail.com> <20210501115923.483816-8-felipe.contreras@gmail.com> Date: Sun, 02 May 2021 08:07:12 -0300 Message-ID: <87v981mm1r.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 3JIE45AQLA5RGJMNQPDJA6JXK7X7ROGL X-Message-ID-Hash: 3JIE45AQLA5RGJMNQPDJA6JXK7X7ROGL X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619953638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YerUZD7fnIZR3atmGRHqkI8M7wdcy3WPs21IDoyUvJk=; b=LOlRslOy2RYsxIKO9tT4paxY3OJCXFhLEZlDNoRlpZhedFotqiAv3j5wSWX5rn0Ci/I9By ikbiYCDgQDsXoAN6u2ITd6gdcrE+uSpsU9Mww71QlnzaisIHGBenrWnl3ynpbX0luIf2Yg mtHjQaIA91zz4ICRkxwTkamBCObsVEgC1WoW3vrgMFvDQn2wdJpSj6Kfxl/SnK58J64VV2 vOQfHSS1KMOgi7HKzA4O5fhvRNuKJarMM7X/VfXovgU+QJG6lDAwdgE5St46+fR33UOP8k yHmjFWrJe/GEkUEpxWZHPCi/Oso9eEmVSOQo42Y4eHhOVDTGXjj9l7a0M50pow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619953638; a=rsa-sha256; cv=none; b=Fqf6oV7ksdCvU7u181wscGVcmmm94GQJbHWf0i0tnVC8fjTihDhOrYrgIvyuD58ZJsa3lT Mkm3P1JAUm+kMFIft7hn/q8uYKKnx08IVQX+9P/2PdjLGkiRIJz4/8G/TlwQP8jQuFMGCT 0/IRHKfX/MmOx7RkYY6OKdgl3cZ4x3doOKNPN1hz/sK5SQBR19LETY+5Zfqrrc7735yLlr k22tN6o69L7KYRf9j6Wwx/Ng6RHyoIwN59f7YsqSAzX3AFxWLdZ+0lrKUuA7o9W15uCpn3 epifWTgd+ASSD9+AVwJAjMjL53p/g2tEAsfUnZmH+fT3pSS/oAeNLYmB5xG9rA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.07 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 748AE2C791 X-Spam-Score: -2.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: l6fhPtboycjp Felipe Contreras writes: > Signed-off-by: Felipe Contreras > --- > test/T395-ruby.sh | 20 ++++++++------------ > 1 file changed, 8 insertions(+), 12 deletions(-) > > diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh > index f871ddd9..f5a8d245 100755 > --- a/test/T395-ruby.sh > +++ b/test/T395-ruby.sh > @@ -24,7 +24,7 @@ notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > test_ruby <<"EOF" > @q = @db.query('tag:inbox') > @q.sort = Notmuch::SORT_OLDEST_FIRST > -for t in @q.search_threads do > +@q.search_threads.each do |t| > puts t.thread_id > end > EOF The downside to these changes is that they make the tests harder for the non-rubyist (i.e. me) to read. So I'm not (yet) convinced this is a good change.