From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AOctO8b2jmBtbgEAgWs5BA (envelope-from ) for ; Sun, 02 May 2021 21:00:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QI7cNsb2jmAlJgAAB5/wlQ (envelope-from ) for ; Sun, 02 May 2021 19:00:22 +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 C206C9779 for ; Sun, 2 May 2021 21:00:21 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 35A40271D4; Sun, 2 May 2021 15:00:16 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 794151FAC2 for ; Sun, 2 May 2021 15:00:13 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 612BB1B00DCD; Sun, 2 May 2021 22:00:12 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1619982012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OuQlhkhPF2ytFwICVcDIjvyFHQPRubz4cAjCZZ9ODF4=; b=ERG8aNbOmkE3/oEbMM2SYPVIsmhzpeJRpG88JS0+DOoqZ5T/ljU2xbLoBb5AzwMCgIdFav 3Qf/quOSVh4ZdZvhl9AsQRW49Ac0JGGgw6ncKfWrjJ2CR897uwcGgSdZ7hh51oU2Xkci9G djfPZ7t76wryQawL2YUk5rr964oUQIQp72U5FbVtgXXaORTfRL7qRwy2X0B7C3vHjNGHc1 wovacD4glHi9yMyJMtHGSFqnykSTgAjjbVPLakdeSacNEpqD/IZ2Do7YfPsEj6XOclMryU Dh2WHfYG1Ta8JfvtELS/B+Sp5NE8/eIfQJO6hqLgTZC1apgZo4eWKLAldNeCfg== From: Tomi Ollila To: David Bremner , Felipe Contreras , notmuch@notmuchmail.org Subject: Re: [PATCH 7/9] test: ruby: use much more standard Ruby idioms In-Reply-To: <87v981mm1r.fsf@tethera.net> References: <20210501115923.483816-1-felipe.contreras@gmail.com> <20210501115923.483816-8-felipe.contreras@gmail.com> <87v981mm1r.fsf@tethera.net> User-Agent: Notmuch/0.31.4+128~gc67b63a (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1619982012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OuQlhkhPF2ytFwICVcDIjvyFHQPRubz4cAjCZZ9ODF4=; b=N+CUZui9/T7u3nQMo2gE3AgOQV4grNi5KsYHHFfi0xt8cwhrgjMm3YKioeSsRc4jONP84U i1QR9ljpM/w2WrZ7T3lV/2gSbdzLMtYLDvju47ZLHWH8gkW12jrKecwrn2KKFHEXWK9elM zVvqtjf1ce2vaY68ch92jmAsPzlIbmKlyMPcJJ51YPdKt86ycq7GwN/Fl9TbMCGyI/DAkF nQjTVPTn2QzSxIkn7afE/h/7gedHcPA9WsQXGECc1fU6kbsvKm8vtYBnItfk/00bhRjrAf krwOwUbnlr8JSAmG1uJzYnpN0iWGssW55gfYImsPhjCSTjH9oyC+W28s86I+XQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1619982012; a=rsa-sha256; cv=none; b=TN8Dr4FKoDGSz9Ggs/99h1HKDDSyDgiYK8jCCttv1/ONRftZrcOZ7lmqj+9O4EZRNAVDqz VcSZQeYFSjetnuiby6ya+YfWmaM+AWLG5VpCx2VAZWEQMlSG/C9SXsQQWDfIquu81xygm7 oZJvfUqNEgWnfUMgjOe8Ne7N/dnZolwfGwfeZo/wM3UXOVmH2aTTRL8w1bL/1EGmuXlezt DdAJt7l/Spy60CL+t8HN7BNK4jeX9B0wBJb3Gm8mbUrZBPTYAxXVbUpkH3m8FvM+Ucub7n C9WcNsL/PirNkVcE8u15u38L0l595xnMCnj2yCIwbee/iADORuY6jyHASQw1Vg== Message-ID-Hash: VLOQ4P6O46SUPIIMR6K3N6K5I5B234JD X-Message-ID-Hash: VLOQ4P6O46SUPIIMR6K3N6K5I5B234JD X-MailFrom: tomi.ollila@iki.fi 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619982021; 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:dkim-signature; bh=khwOYplZS61ADpNel2wFqz1ab1hklmkeAixdPWhcA6Q=; b=RRIFvg00qui9LxOydEnU9wuRZyH71NBjZW+sBp5vTxRbHBHRSIIuA1yLf0OM0Sble6Zdv0 +Gp913RlMV8ekNRlCs/yy/SaYZRhDU60oOHue1Yj/jBEvd9CSjfrBwyVtD5fsQ5diMqiJu LxGtUQGb2FXvGXe7HeBBTTggZq09LOeAGuJKXTA34m09BQL6et07qj52MQwZxG4ZWJSEHa KcQCx67bflsMX0AECJSc/CLeKwqb+5p5Ycxe1oHZx3GBy+XCVxTwV+0i3jMjAyilszf0wy C6f09Df4SpVPG9cEjsrjqemNl49ToVEDO5seqRXqNZho/JkqPfFNgnLBeuwlpA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1619982021; a=rsa-sha256; cv=fail; b=sSYkPOV8dv/XDG08dTrur1nk5piLxhS6ccteJvRjxV6QuyvsfrNneGns9egf7R8bMLczFo a7L+yZ8p8/Tmqdz7g7fTFUPuqeJO3ZL/kR94jmWaVRrf/7Tysl9r0ebomxU1uCoVX6Xy9+ LWIuBYhV4gPz8KRr/Mli5o3sFlcnzyT4GwGuHUrU5sjSH64O+v2ZIk3+hX83M73ct7748S H/gxpE5twaWHCrqhFCHRXWbghsy8AKHeCmOP4LfqwZ2r2NZS3FUGbsMC4+N7gm4hp3CF/w lOzDxEhcZ6NK5BDE/XbH2r660bmG3dHFfjXItYr0ZkOJtjg/XH0HiUgfDoN5NQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=ERG8aNbO; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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: 0.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=ERG8aNbO; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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: C206C9779 X-Spam-Score: 0.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: UWikYa4L9df0 On Sun, May 02 2021, David Bremner wrote: > 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. I am convinced that this is good change (like all the other changes in this series). Every now and then I encounter ruby code, and have seen syntax like `@q.search_threads.each do |t|` been used, so more exposure to that syntax is good thing (for everyone (IMO)) Tomi