提交 ab0d216b 编写于 作者: A Aaron Patterson

reduce function calls on Array

上级 3f88f26d
......@@ -441,9 +441,8 @@ def token_and_options(request)
#
# 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册