diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 15:43:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 15:43:27 -0700 |
commit | ab0d216b670e13d6f65e82dfdeb3d08c75101274 (patch) | |
tree | 1f4a4c7817b4cb6d8f51a06c5065bb11fd416688 /actionpack/lib/action_controller/metal/http_authentication.rb | |
parent | 3f88f26d1e17277dfa85a22bb01c1db558b6addf (diff) | |
download | rails-ab0d216b670e13d6f65e82dfdeb3d08c75101274.tar.gz rails-ab0d216b670e13d6f65e82dfdeb3d08c75101274.tar.bz2 rails-ab0d216b670e13d6f65e82dfdeb3d08c75101274.zip |
reduce function calls on Array
Diffstat (limited to 'actionpack/lib/action_controller/metal/http_authentication.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/http_authentication.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index e0c5eaca84..547cec7081 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -441,9 +441,8 @@ module ActionController # # Returns String. def encode_credentials(token, options = {}) - values = ["token=#{token.to_s.inspect}"] - options.each do |key, value| - values << "#{key}=#{value.to_s.inspect}" + values = ["token=#{token.to_s.inspect}"] + options.map do |key, value| + "#{key}=#{value.to_s.inspect}" end "Token #{values * ", "}" end |