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:
parent
0cfa496697
commit
38251d2e33
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue