--- /dev/null
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 29442431FD5\r
+ for <notmuch@notmuchmail.org>; Sun, 13 May 2012 16:36:27 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id IORQbugeM98N for <notmuch@notmuchmail.org>;\r
+ Sun, 13 May 2012 16:36:24 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+ [18.9.25.14])\r
+ by olra.theworths.org (Postfix) with ESMTP id A78C2431FBD\r
+ for <notmuch@notmuchmail.org>; Sun, 13 May 2012 16:36:23 -0700 (PDT)\r
+X-AuditID: 1209190e-b7fd86d0000008b4-4c-4fb04576ea48\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+ by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 90.32.02228.67540BF4; Sun, 13 May 2012 19:36:22 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q4DNaLva025784; \r
+ Sun, 13 May 2012 19:36:22 -0400\r
+Received: from drake.mit.edu\r
+ (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [209.6.116.242]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q4DNaKS2001100\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sun, 13 May 2012 19:36:21 -0400 (EDT)\r
+Received: from amthrax by drake.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1STiKq-0004YS-9o; Sun, 13 May 2012 19:36:20 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 4/5] ruby: Update for changes to\r
+ notmuch_database_get_directory\r
+Date: Sun, 13 May 2012 19:36:12 -0400\r
+Message-Id: <1336952173-17422-5-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1336952173-17422-1-git-send-email-amdragon@mit.edu>\r
+References: <1336939029-13969-1-git-send-email-amdragon@mit.edu>\r
+ <1336952173-17422-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFrrFIsWRmVeSWpSXmKPExsUixCmqrFvmusHfYPIfLovZrT+YLG60djNa\r
+ NE13trh+cyazxZuV81gdWD0Of13I4jHx/Gk2j1v3X7N7PFt1i9ljy6H3zAGsUVw2Kak5mWWp\r
+ Rfp2CVwZ+8+eYi5YyVEx/aZOA+MFti5GTg4JAROJhVc+MULYYhIX7q0HinNxCAnsY5SYtaCb\r
+ BcLZwChx81kXM4Rzn0niyY13TBDOLEaJ1bcmg81iE9CQ2LZ/OdgsEQFpiZ13Z7OCFDELdDFK\r
+ /H7TDNTOwSEsECTx7EEQSA2LgKrE9gufWEBsXgEHic+P17JD3CEv8fR+H9hMTgFHib4HH8Hi\r
+ QgLlEjPar7NMYORfwMiwilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdYLzezRC81pXQTIzgIJfl2\r
+ MH49qHSIUYCDUYmH95XpBn8h1sSy4srcQ4ySHExKorxMTkAhvqT8lMqMxOKM+KLSnNTiQ4wS\r
+ HMxKIrzrH673F+JNSaysSi3Kh0lJc7AoifOqab3zExJITyxJzU5NLUgtgsnKcHAoSfAudgEa\r
+ KliUmp5akZaZU4KQZuLgBBnOAzT8DEgNb3FBYm5xZjpE/hSjopQ47xWQhABIIqM0D64XliRe\r
+ MYoDvSLMWw9SxQNMMHDdr4AGMwEN5hdYBzK4JBEhJdXAGLTk/ssZwZNWf3t7V8GsWzv3rZpM\r
+ iHfE8nOxgbvFOiMYOs/ctW3O6AoLTlruy3m8P/5Jg3zgpHfl0Q5nY9ir3wt7dhsG759d03XL\r
+ /RNvTa6YG3fGsSXTZl6cmGsSxV0gNNPW/Z7Mn/B7J3WOlP1l8/vbveT4XPutMzyaZzst09xc\r
+ MiP754EKJZbijERDLeai4kQA7jR7pe0CAAA=\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 13 May 2012 23:36:27 -0000\r
+\r
+---\r
+ bindings/ruby/database.c | 11 ++++++-----\r
+ 1 file changed, 6 insertions(+), 5 deletions(-)\r
+\r
+diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c\r
+index 409d54f..e84f726 100644\r
+--- a/bindings/ruby/database.c\r
++++ b/bindings/ruby/database.c\r
+@@ -252,6 +252,7 @@ VALUE\r
+ notmuch_rb_database_get_directory (VALUE self, VALUE pathv)\r
+ {\r
+ const char *path;\r
++ notmuch_status_t ret;\r
+ notmuch_directory_t *dir;\r
+ notmuch_database_t *db;\r
+ \r
+@@ -260,11 +261,11 @@ notmuch_rb_database_get_directory (VALUE self, VALUE pathv)\r
+ SafeStringValue (pathv);\r
+ path = RSTRING_PTR (pathv);\r
+ \r
+- dir = notmuch_database_get_directory (db, path);\r
+- if (!dir)\r
+- rb_raise (notmuch_rb_eXapianError, "Xapian exception");\r
+-\r
+- return Data_Wrap_Struct (notmuch_rb_cDirectory, NULL, NULL, dir);\r
++ ret = notmuch_database_get_directory (db, path, &dir);\r
++ notmuch_rb_status_raise (ret);\r
++ if (dir)\r
++ return Data_Wrap_Struct (notmuch_rb_cDirectory, NULL, NULL, dir);\r
++ return Qnil;\r
+ }\r
+ \r
+ /*\r
+-- \r
+1.7.10\r
+\r