aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorTan Le <tanle.oz@gmail.com>2015-04-09 09:05:05 +1000
committerTan Le <tanle.oz@gmail.com>2015-04-09 09:05:05 +1000
commit8d605b8ee84125fe623832f39d055e52130bb590 (patch)
tree9e87ce90e7398a54b3fe1e37663596be89baaa93 /actionpack
parent74cec956e80611df621c9d831696e3b59c65e482 (diff)
downloadrails-8d605b8ee84125fe623832f39d055e52130bb590.tar.gz
rails-8d605b8ee84125fe623832f39d055e52130bb590.tar.bz2
rails-8d605b8ee84125fe623832f39d055e52130bb590.zip
A shorter and more concise version of select..size
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index aac5546aa1..7840a22640 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1690,7 +1690,7 @@ module ActionDispatch
end
def shallow_nesting_depth #:nodoc:
- @nesting.select(&:shallow?).size
+ @nesting.count(&:shallow?)
end
def param_constraint? #:nodoc: