Re: [PATCH 2/3] ruby: add db.config

Subject: Re: [PATCH 2/3] ruby: add db.config

Date: Thu, 3 Jun 2021 22:35:32 -0500

To: notmuch@notmuchmail.org

Cc: David Bremner

From: Felipe Contreras


On Thu, Jun 3, 2021 at 10:29 PM Felipe Contreras
<felipe.contreras@gmail.com> wrote:

> --- a/test/T395-ruby.sh
> +++ b/test/T395-ruby.sh
> @@ -88,4 +88,11 @@ test_ruby <<EOF
>  puts Notmuch::Database.open_with_config.path
>  EOF
>
> +test_begin_subtest "config"
> +notmuch config list | grep -v '^built_with\.' > EXPECTED
> +test_ruby <<"EOF"
> +config_db = Notmuch::Database.open_with_config
> +config_db.config { |e| puts '%s=%s' % e }
> +EOF
> +

I just noticed this might a little more idiomatic:

  Notmuch::Database.open_with_config do |db|
    db.config { |e| puts '%s=%s' % e }
  end

-- 
Felipe Contreras
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: