Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Rich Lane <rlane@club.cc.cmu.edu>
To: sup-devel@rubyforge.org
Cc: Rich Lane <rlane@vmware.com>
Subject: [sup-devel] [PATCH] fix ask_for_contacts on Ruby 1.9
Date: Wed, 13 Jan 2010 10:13:40 -0800	[thread overview]
Message-ID: <1263406420-27036-1-git-send-email-rlane@club.cc.cmu.edu> (raw)

From: Rich Lane <rlane@vmware.com>

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
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


             reply	other threads:[~2010-01-13 18:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 18:13 Rich Lane [this message]
2010-01-23 12:41 ` 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=1263406420-27036-1-git-send-email-rlane@club.cc.cmu.edu \
    --to=rlane@club.cc.cmu.edu \
    --cc=rlane@vmware.com \
    --cc=sup-devel@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