Subject: [sup-devel] [PATCH] fix ask_for_contacts on Ruby 1.9

From: Rich Lane <[email-masked]>
Date: Wed, 13 Jan 2010 10:13:40 -0800

From: Rich Lane <[email-masked]>

String doesn't respond to :map anymore. The previous code was also joining with
" " instead of ", ", which was broken.
---
 lib/sup/buffer.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index c826ab9..990dd4a 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -537,7 +537,7 @@ EOS
   end
 
   def ask_for_contacts domain, question, default_contacts=[]
-    default = default_contacts.map { |s| s.to_s }.join(" ")
+    default = default_contacts.is_a?(String) ? default_contacts : default_contacts.map { |s| s.to_s }.join(", ")
     default += " " unless default.empty?
 
     recent = Index.load_contacts(AccountManager.user_emails, :num => 10).map { |c| [c.full_address, c.email] }
-- 
1.6.3.3

_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: William Morgan <[email-masked]>
Date: Sat, 23 Jan 2010 07:41:53 -0500

Applied to master and will go out in 0.10. Thanks!
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel