1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

prevent string allocations

This commit is contained in:
Aaron Patterson 2015-08-06 15:19:30 -07:00
parent 0cfa496697
commit 38251d2e33

View file

@ -39,7 +39,7 @@ module ActionDispatch
ENV_METHODS.each do |env|
class_eval <<-METHOD, __FILE__, __LINE__ + 1
def #{env.sub(/^HTTP_/n, '').downcase} # def accept_charset
@env["#{env}"] # @env["HTTP_ACCEPT_CHARSET"]
@env["#{env}".freeze] # @env["HTTP_ACCEPT_CHARSET"]
end # end
METHOD
end