From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.117.16 with SMTP id p16cs563998agc; Fri, 23 Oct 2009 06:15:58 -0700 (PDT) Received: by 10.224.109.141 with SMTP id j13mr5409711qap.84.1256303758019; Fri, 23 Oct 2009 06:15:58 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 4si8122075qwe.47.2009.10.23.06.15.57; Fri, 23 Oct 2009 06:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id BF55E167830D; Fri, 23 Oct 2009 09:15:57 -0400 (EDT) Received: from kuovi.tilus.net (kuovi.tilus.net [80.68.89.168]) by rubyforge.org (Postfix) with ESMTP id AF43B16782B1 for ; Fri, 23 Oct 2009 09:15:50 -0400 (EDT) Received: by kuovi.tilus.net (Postfix, from userid 1000) id 32E656011; Fri, 23 Oct 2009 14:15:50 +0100 (BST) From: Tero Tilus To: sup-talk In-reply-to: <1256297205-sup-683@sam.mediasupervision.de> References: <1256297205-sup-683@sam.mediasupervision.de> Date: Fri, 23 Oct 2009 16:15:50 +0300 Message-Id: <1256302994-sup-9955@tilus.net> User-Agent: Sup/git Subject: Re: [sup-talk] A fix for the joining threads bug with Ferret X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Excerpts from Gregor Hoffleit's message: > With my limited Ruby knowledge, my quick and dirty fix was: > > if entry[:refs]!="" then > d[:refs]=entry[:refs] > else > d[:refs]=(m.refs + m.replytos).uniq.join(" ") > end > > Is this what the above code is about? I would expect it to be something alike. Rails has Object#empty? which is true (I think) for nil, false, empty list and empty string. I'd go with entry[:refs].to_s != "" to handle nil as "no refs" too. -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk