Re: [PATCH 7/9] test: ruby: use much more standard Ruby idioms

Subject: Re: [PATCH 7/9] test: ruby: use much more standard Ruby idioms

Date: Sun, 02 May 2021 08:07:12 -0300

To: Felipe Contreras, notmuch@notmuchmail.org

Cc:

From: David Bremner


Felipe Contreras <felipe.contreras@gmail.com> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  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.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: