diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-13 09:07:56 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-13 09:07:56 -0700 |
commit | 363bc62a095f853e5af2014fd1b713b088082217 (patch) | |
tree | 4d86f6bf4083a0bc1439c98d14d16c0b75047537 | |
parent | b23e9e7eed47fa71b0cf974577fa2db8dde83336 (diff) | |
parent | 78c176e2fabff6629fd695b4292bd60e42852ec4 (diff) | |
download | rails-363bc62a095f853e5af2014fd1b713b088082217.tar.gz rails-363bc62a095f853e5af2014fd1b713b088082217.tar.bz2 rails-363bc62a095f853e5af2014fd1b713b088082217.zip |
Merge pull request #12517 from vipulnsward/destructive_map_am
Change `map` to `map!` to save extra array creation on new array
-rw-r--r-- | actionview/lib/action_view/helpers/url_helper.rb | 2 |
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 |