aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2013-10-13 20:58:50 +0530
committerVipul A M <vipulnsward@gmail.com>2013-10-13 20:58:50 +0530
commit78c176e2fabff6629fd695b4292bd60e42852ec4 (patch)
treee5d039ef140e9fdfa0680d9cd0a71d2318e02dca /actionview
parent0df9149fd6b0ef4cd9003c1a9c406e2c586c9503 (diff)
downloadrails-78c176e2fabff6629fd695b4292bd60e42852ec4.tar.gz
rails-78c176e2fabff6629fd695b4292bd60e42852ec4.tar.bz2
rails-78c176e2fabff6629fd695b4292bd60e42852ec4.zip
Change `map` to `map!` to save extra array creation on new array
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index 8a4918a8c0..2f5246f42a 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -455,7 +455,7 @@ module ActionView
html_options, name = name, nil if block_given?
html_options = (html_options || {}).stringify_keys
- extras = %w{ cc bcc body subject }.map { |item|
+ extras = %w{ cc bcc body subject }.map! { |item|
option = html_options.delete(item) || next
"#{item}=#{Rack::Utils.escape_path(option)}"
}.compact