mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
drop hash allocations during match
This commit is contained in:
parent
6bd9ade062
commit
b754d9b56d
1 changed files with 2 additions and 2 deletions
|
@ -136,11 +136,11 @@ module ActionDispatch
|
|||
|
||||
routes.map! { |r|
|
||||
match_data = r.path.match(req.path_info)
|
||||
path_parameters = {}
|
||||
path_parameters = r.defaults.dup
|
||||
match_data.names.zip(match_data.captures) { |name,val|
|
||||
path_parameters[name.to_sym] = Utils.unescape_uri(val) if val
|
||||
}
|
||||
[match_data, r.defaults.merge(path_parameters), r]
|
||||
[match_data, path_parameters, r]
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue