提交 5b81d1f3 编写于 作者: T thedarkone

Hash#empty? is faster than Enumerable#any? when used on a Hash.

上级 70357666
......@@ -443,7 +443,7 @@ def generate
return [path, params.keys] if @extras
path << "?#{params.to_query}" if params.any?
path << "?#{params.to_query}" unless params.empty?
path
rescue Rack::Mount::RoutingError
raise_routing_error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册