1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
thedarkone 2010-09-27 17:42:32 +02:00
parent 70357666bc
commit 5b81d1f3ef

View file

@ -443,7 +443,7 @@ module ActionDispatch
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