Permalink
Browse files

Merge pull request #12517 from vipulnsward/destructive_map_am

Change `map` to `map!` to save extra array creation on new array
  • Loading branch information...
2 parents b23e9e7 + 78c176e commit 363bc62a095f853e5af2014fd1b713b088082217 @rafaelfranca rafaelfranca committed Oct 13, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionview/lib/action_view/helpers/url_helper.rb
@@ -455,7 +455,7 @@ def mail_to(email_address, name = nil, html_options = {}, &block)
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

0 comments on commit 363bc62

Please sign in to comment.