Skip to content

Commit

Permalink
avoid array allocation when extracting usernames and passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 13, 2014
1 parent 890a189 commit 325c9d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion actionpack/lib/action_dispatch/routing/route_set.rb
Expand Up @@ -654,7 +654,13 @@ def _generate_prefix(options = {})
def url_for(options) def url_for(options)
options = default_url_options.merge(options || {}) options = default_url_options.merge(options || {})


user, password = extract_authentication(options) user = password = nil

This comment has been minimized.

Copy link
@carlosantoniodasilva

carlosantoniodasilva May 13, 2014

Member

@tenderlove does that mean we can get rid of extract_authentication?

This comment has been minimized.

Copy link
@pixeltrix

pixeltrix May 13, 2014

Contributor

@carlosantoniodasilva yes, yes you can 😄

This comment has been minimized.

Copy link
@carlosantoniodasilva

if options[:user] && options[:password]
user = options.delete :user
password = options.delete :password
end

recall = options.delete(:_recall) recall = options.delete(:_recall)


original_script_name = options.delete(:original_script_name).presence original_script_name = options.delete(:original_script_name).presence
Expand Down

1 comment on commit 325c9d5

@tenderlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I was going to rm it but totally forgot. Please rm!

Please sign in to comment.