mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reduce memory allocations
Group sequential maps and remove unnecessary `to_a` in range
This commit is contained in:
parent
5a477890c8
commit
4ea64630aa
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ module ActionDispatch
|
|||
US_ASCII = Encoding::US_ASCII
|
||||
UTF_8 = Encoding::UTF_8
|
||||
EMPTY = (+"").force_encoding(US_ASCII).freeze
|
||||
DEC2HEX = (0..255).to_a.map { |i| ENCODE % i }.map { |s| s.force_encoding(US_ASCII) }
|
||||
DEC2HEX = (0..255).map { |i| (ENCODE % i).force_encoding(US_ASCII) }.freeze
|
||||
|
||||
ALPHA = "a-zA-Z"
|
||||
DIGIT = "0-9"
|
||||
|
|
Loading…
Reference in a new issue