Permalink
Browse files

avoid array allocation when extracting usernames and passwords

  • Loading branch information...
1 parent 890a189 commit 325c9d5e5235db4b5210d9db6c863835d1ac7eed @tenderlove tenderlove committed May 13, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -654,7 +654,13 @@ def _generate_prefix(options = {})
def url_for(options)
options = default_url_options.merge(options || {})
- user, password = extract_authentication(options)
+ user = password = nil
carlosantoniodasilva
carlosantoniodasilva May 13, 2014 Owner

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

+
+ if options[:user] && options[:password]
+ user = options.delete :user
+ password = options.delete :password
+ end
+
recall = options.delete(:_recall)
original_script_name = options.delete(:original_script_name).presence

1 comment on commit 325c9d5

@tenderlove
Owner

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

Please sign in to comment.