From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.218.138 with SMTP id hq10cs160856icb; Mon, 27 Dec 2010 02:18:00 -0800 (PST) Received: by 10.229.240.198 with SMTP id lb6mr10537465qcb.255.1293445080486; Mon, 27 Dec 2010 02:18:00 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id n7si15134154qcu.186.2010.12.27.02.18.00; Mon, 27 Dec 2010 02:18:00 -0800 (PST) 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 237E719783C7; Mon, 27 Dec 2010 05:18:00 -0500 (EST) Received: from gateway0.EECS.Berkeley.EDU (gateway0.EECS.Berkeley.EDU [169.229.60.87]) by rubyforge.org (Postfix) with ESMTP id 074ED1858354 for ; Mon, 27 Dec 2010 05:07:21 -0500 (EST) Received: from icsi.berkeley.edu (samurai.ICIR.org [192.150.187.48]) (authenticated bits=0) by gateway0.EECS.Berkeley.EDU (8.14.4/8.13.5) with ESMTP id oBRA7IN9012776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Dec 2010 02:07:20 -0800 (PST) Date: Mon, 27 Dec 2010 02:07:18 -0800 From: Matthias Vallentin To: sup-talk@rubyforge.org Message-ID: <20101227100718.GL60419@icsi.berkeley.edu> MIME-Version: 1.0 Content-Disposition: inline X-PGP-Fingerprint: 8A3B 1323 B469 CCBA 54D3 3BCC D5E7 8DF5 9C8D 4B41 User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [sup-talk] message.list_address weirdness 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org I cannot get message.list_address to match to add labels before adding messages although the messages definitively have the List-Post header. I found that message.list_address is sometimes a Person instance, which suggest a bug in the code assigning the instance variable @list_address (reformatted): @list_address = if header["list-post"] address = if header["list-post"] =~ /mailto:(.*?)[>\s$]/ $1 elsif header["list-post"] =~ /@/ header["list-post"] # just try the whole fucking thing end address && Person.from_address(address) elsif header["x-mailing-list"] Person.from_address header["x-mailing-list"] end This code looks erroneous in that Person.from_address returns a Person instance in the elsif branch. Shouldn't that be a string of the address instead, i.e., Person.from_address(header["x-mailing-list"]).email ? The same problem seems to appear in the conjunction address && Person.from_address(address) which should in my opinion be address && Person.from_address(address).email . Does that makes sense? Matthias _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk