From mboxrd@z Thu Jan 1 00:00:00 1970 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sat, 05 Apr 2008 12:39:29 +0200 Subject: [sup-talk] [PATCH] Fix a bug when forwarding and using crypto. In-Reply-To: <1207331044-sup-3269@south> References: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> <1207331044-sup-3269@south> Message-ID: <1207391796-sup-2972@ausone.local> Excerpts from William Morgan's message of Fri Apr 04 19:44:53 +0200 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-04-04: > > - to_email = (@header["To"] + @header["Cc"] + @header["Bcc"]).map { |p| PersonManager.person_for(p).email } > > + to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| PersonManager.person_for(p).email } > > What was the bug? When some of these @header[...] are not present I get a nil and then get an error when using '+' on them. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080405/863f13ca/attachment.bin