mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reduce Array allocations
This commit is contained in:
parent
acf7642ece
commit
7e299ce230
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ module ActiveSupport
|
|||
|
||||
last = parts.pop
|
||||
|
||||
parts.reverse.inject(last) do |acc, part|
|
||||
parts.reverse!.inject(last) do |acc, part|
|
||||
part.empty? ? acc : "#{part}(::#{acc})?"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue