提交 b1051c5d 编写于 作者: A Aaron Patterson

use arg size for parallel iteration

we already know the length of the args, so we can use that length for
parallel iteration and cut down on allocations for `url_for` calls.
上级 37654d12
......@@ -215,7 +215,7 @@ def optimize_routes_generation?(t)
def parameterize_args(args)
params = {}
@required_parts.zip(args.map(&:to_param)) { |k,v| params[k] = v }
@arg_size.times { |i| params[@required_parts[i]] = args[i].to_param }
params
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册