Strip trailing whitespace from lines before joining them.

This commit is contained in:
Tom Hughes 2009-11-10 09:13:39 +00:00
parent 69a3cd04a7
commit a7368d7f8a

View file

@ -24,7 +24,7 @@ mail = Mail.new(STDIN)
message = Message.new(:sender => from, :recipient => to,
:sent_on => Time.now.getutc,
:title => mail["Subject"],
:body => mail.body.join("\n"))
:body => mail.body.map { |l| l.rstrip }.join("\n"))
message.save!
Notifier::deliver_message_notification(message)