aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorthedarkone <thedarkone2@gmail.com>2010-09-27 17:42:32 +0200
committerthedarkone <thedarkone2@gmail.com>2010-09-27 17:45:59 +0200
commit5b81d1f3ef1f1b06495eadcc1c2d110d76ac1de3 (patch)
treef480477415a224996a86aaf45959f3035c7bc931 /actionpack/lib
parent70357666bc86629c8d10501209105b144855ddbc (diff)
downloadrails-5b81d1f3ef1f1b06495eadcc1c2d110d76ac1de3.tar.gz
rails-5b81d1f3ef1f1b06495eadcc1c2d110d76ac1de3.tar.bz2
rails-5b81d1f3ef1f1b06495eadcc1c2d110d76ac1de3.zip
Hash#empty? is faster than Enumerable#any? when used on a Hash.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 60b1342d55..eeec10a403 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -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