Permalink
Browse files

join strings rather than resizing buffer

  • Loading branch information...
tenderlove committed Oct 18, 2010
1 parent 330327e commit 081e15f104b7da597114a8539f519953f166e096
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/number_helper.rb
@@ -70,11 +70,11 @@ def number_to_phone(number, options = {})
number.slice!(0, 1) if number.starts_with?('-')
end
- str = ""
+ str = []
str << "+#{country_code}#{delimiter}" unless country_code.blank?
str << number
str << " x #{extension}" unless extension.blank?
- ERB::Util.html_escape(str)
+ ERB::Util.html_escape(str.join)
end
# Formats a +number+ into a currency string (e.g., $13.65). You can customize the format

0 comments on commit 081e15f

Please sign in to comment.