Permalink
Browse files

Change `map` to `map!` to save extra array creation on new array

  • Loading branch information...
1 parent 0df9149 commit 78c176e2fabff6629fd695b4292bd60e42852ec4 @vipulnsward vipulnsward 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 78c176e

Please sign in to comment.