mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
avoid creating an array an then doing a join by use of string interpolation
This commit is contained in:
parent
fef89bd28c
commit
91127334a9
1 changed files with 1 additions and 1 deletions
|
@ -454,7 +454,7 @@ module Sinatra
|
|||
hash.each do |key, value|
|
||||
key = key.to_s.tr('_', '-')
|
||||
value = value.to_i if key == "max-age"
|
||||
values << [key, value].join('=')
|
||||
values << "#{key}=#{value}"
|
||||
end
|
||||
|
||||
response['Cache-Control'] = values.join(', ') if values.any?
|
||||
|
|
Loading…
Reference in a new issue