Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Tero Tilus <tero@tilus.net>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] A fix for the joining threads bug with Ferret
Date: Fri, 23 Oct 2009 16:15:50 +0300	[thread overview]
Message-ID: <1256302994-sup-9955@tilus.net> (raw)
In-Reply-To: <1256297205-sup-683@sam.mediasupervision.de>

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


  reply	other threads:[~2009-10-23 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 11:48 Gregor Hoffleit
2009-10-23 13:15 ` Tero Tilus [this message]
2009-11-01 22:57 ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256302994-sup-9955@tilus.net \
    --to=tero@tilus.net \
    --cc=sup-talk@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox