diff options
author | thedarkone <thedarkone2@gmail.com> | 2010-09-27 17:42:32 +0200 |
---|---|---|
committer | thedarkone <thedarkone2@gmail.com> | 2010-09-27 17:45:59 +0200 |
commit | 5b81d1f3ef1f1b06495eadcc1c2d110d76ac1de3 (patch) | |
tree | f480477415a224996a86aaf45959f3035c7bc931 /actionpack/lib/action_dispatch | |
parent | 70357666bc86629c8d10501209105b144855ddbc (diff) | |
download | rails-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/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
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 |