From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <notmuch-bounces@notmuchmail.org>
Received: from mp11.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms9.migadu.com with LMTPS
	id qD0oJLI2K2TuAAEASxT56A
	(envelope-from <notmuch-bounces@notmuchmail.org>)
	for <larch@yhetil.org>; Mon, 03 Apr 2023 22:27:30 +0200
Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp11.migadu.com with LMTPS
	id mHUtJLI2K2RxlAAA9RJhRA
	(envelope-from <notmuch-bounces@notmuchmail.org>)
	for <larch@yhetil.org>; Mon, 03 Apr 2023 22:27:30 +0200
Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255])
	(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 41656FABA
	for <larch@yhetil.org>; Mon,  3 Apr 2023 22:27:30 +0200 (CEST)
Received: from yantan.tethera.net (localhost [127.0.0.1])
	by mail.notmuchmail.org (Postfix) with ESMTP id 34C6A5F7EF;
	Mon,  3 Apr 2023 20:27:28 +0000 (UTC)
Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232])
	by mail.notmuchmail.org (Postfix) with ESMTPS id 1EA9D5E53D
	for <notmuch@notmuchmail.org>; Mon,  3 Apr 2023 20:27:25 +0000 (UTC)
Received: by mail-oi1-x232.google.com with SMTP id bl22so8725023oib.11
        for <notmuch@notmuchmail.org>; Mon, 03 Apr 2023 13:27:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112; t=1680553643;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to;
        bh=x36ukY3as0jzZxvI4HvxBnQDRwXMUNgsU+mZha74SM4=;
        b=FpR+yCw/CaYbmPYe9ce+2zPRL3WHSDm84XqaV59UuzWco/RjtXSzhZcY0oD866fwP6
         oYtqs0iQbuAjrXIlxSNtg+YZaFkD/k2/MdVOPDI8c4vYS/QdYVYQIe1uarsEEEE9MIBY
         R2zoVie/K7/1GD99848Zy2eEftYAvXAAwHcKwOKJ/RBTKBVjTjiqDaLUHZ3/HEVQ41i6
         hEYNpTCsIOm6GBsg1QfAS4XUOuN7+pXTFyZYkGRWKUwJ1f2qI/f1lDpffPWeUV7/LpPD
         QGGJitgx+UbRwn3pvPTPESdBn6ibCjUwApc08BymBhVK6+hJGEQuCt/d0wWibYz03ofH
         qENg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112; t=1680553643;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=x36ukY3as0jzZxvI4HvxBnQDRwXMUNgsU+mZha74SM4=;
        b=pbEMEXJPOtPOtRb9Odl6ySw0J7Y73QlL+YuQbrizDUR+iuU8ZbnbxK5DHNuKtkxHMN
         9Jm7GNr0YOZB5fBk6QMAxEdAjb/r8c72Eqmiq4Ise2gPDwbDddfWzXzjKlKPzQtJOpiL
         5tfd5dZwI7dgN/KmuYbWkBQh4tOww5nrKplt2phYfB4LkpOXdri+KHaxdITK8dSBrPXE
         PvbLYj0wlwL2nicvYMskBkG3LsgyS+4ot/1tzE9ZHDLg0rMf7yJU4WmFB1AjZ0zz3pX+
         GhWnZfQkl/DTBhz6N4AHONxru1587Sz9CWjF7K1uxsfwP3LCN7oTwRL7QQt8CW+GYbQN
         oNPg==
X-Gm-Message-State: AAQBX9fsR3kdhkn1eQu38BScm+Gr/Fv90a0T0DaFwmpBriwdoRoOfapA
	s3fGxtAtDi5r4DD7tfLIJEQdTT/nHXM=
X-Google-Smtp-Source: AKy350YvXIPO2FXs79Ti3ngV47yNQo+E/plOrz74CeEwUzwE/WBy2gBp6RpDfsRgJAHrKbCKdGJdRQ==
X-Received: by 2002:aca:1115:0:b0:386:e309:cfc7 with SMTP id 21-20020aca1115000000b00386e309cfc7mr257098oir.39.1680553643359;
        Mon, 03 Apr 2023 13:27:23 -0700 (PDT)
Received: from localhost ([2806:2f0:4060:fff1:4ae7:daff:fe31:3285])
        by smtp.gmail.com with ESMTPSA id 6-20020aca0906000000b00389533b1cc8sm3662181oij.18.2023.04.03.13.27.22
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 03 Apr 2023 13:27:22 -0700 (PDT)
From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] ruby: query: fix get sort
Date: Mon,  3 Apr 2023 14:27:21 -0600
Message-Id: <20230403202721.101246-1-felipe.contreras@gmail.com>
X-Mailer: git-send-email 2.40.0+fc1
MIME-Version: 1.0
Message-ID-Hash: SSPS2XWIFF6HJKW64K4TEYOUQSNOR3L2
X-Message-ID-Hash: SSPS2XWIFF6HJKW64K4TEYOUQSNOR3L2
X-MailFrom: felipe.contreras@gmail.com
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; digests; suspicious-header
X-Mailman-Version: 3.3.3
Precedence: list
List-Id: "Use and development of the notmuch mail system." <notmuch.notmuchmail.org>
List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
List-Owner: <mailto:notmuch-owner@notmuchmail.org>
List-Post: <mailto:notmuch@notmuchmail.org>
List-Subscribe: <mailto:notmuch-join@notmuchmail.org>
List-Unsubscribe: <mailto:notmuch-leave@notmuchmail.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Migadu-Country: DE
X-Migadu-Flow: FLOW_IN
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680553650; a=rsa-sha256; cv=none;
	b=ZnzRT6YdFs8Ns/aCus/pUa/gdfK6aO+sKirEBPiPsHCUaN8R62W7pEwVp1bsr9V5IXLzXt
	ms7ob9oa7064yvN8VDT3c/jcfGJFQ2FkhAwbECJmSFR6Z9MY/+/vbWbxbUr8hxyna3gEgF
	CO2mN0UcJGQ/2zpbBZ3uWn3U+mQnAVdbUaMrG2KntJaJ4ydD0hdpBD4hiSksbPrekSj+nM
	8UdHCV+gWYOLA3lMN5HkdnSdRwmpoKeLynUhfwyOjLnghx1jxPTmApNXKJYuDK79SpL+De
	6txKnUACY7Z2kwX1WhFAW51xnrivNaf4LrgzP5Cbxu+1zjIGUSwRgDc2l+vLCw==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b="FpR+yCw/";
	dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none);
	spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1680553650;
	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:list-id:list-help:
	 list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature;
	bh=4XmhP03NN1pZExMovgoA2Ya9b5doQDr9OToo+vLd+OM=;
	b=X360BH4MuGw7Fvxm53o7P+Dm4mDnn6xxzaZvp9he+6f6Dztv8CcT6pqKZfG9xfj0bgR4Ba
	nb39snaNAjPVM08XSyPI1CtogQqaRsQolg/r7svx7tdqPIYKAq7/r7ONXbkyQe0evV9Jcr
	RUNo7Vk0OhI75neR6kkPRHWfMuYhP1kZorU/+N9mZNrwnvxoa+3JrG0NmM36855cX07ez8
	59mTHo7x//Ymh9Hypllc2HseWkoM4nKaV2xMkNXMwusfZTdlO577pcmhJNunZgDSk51KJl
	ng+9LV9DkasqcqXo76JDUofqtA9o16/tuJ5xkM9MtMpxJMloeSYAA38kcD20Vw==
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b="FpR+yCw/";
	dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none);
	spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org
X-Migadu-Scanner: scn0.migadu.com
X-Migadu-Spam-Score: -1.81
X-Spam-Score: -1.81
X-Migadu-Queue-Id: 41656FABA
X-TUID: qHAdWUXXr2kC

The order was wrong, right now `query.sort` doesn't return a number.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 bindings/ruby/query.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/ruby/query.c b/bindings/ruby/query.c
index 8a2b4d3d..077def02 100644
--- a/bindings/ruby/query.c
+++ b/bindings/ruby/query.c
@@ -45,7 +45,7 @@ notmuch_rb_query_get_sort (VALUE self)
 
     Data_Get_Notmuch_Query (self, query);
 
-    return FIX2INT (notmuch_query_get_sort (query));
+    return INT2FIX (notmuch_query_get_sort (query));
 }
 
 /*
-- 
2.40.0+fc1