aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-08 20:08:06 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-08 20:08:06 -0300
commit8c8e9b34d576d2b223345d9073aca28c7975ecd7 (patch)
treed39556ac62ee138b0b6ca333453789739278e50a /actionpack
parent35a816a86a74e35b00e1e6d6e55aff01dd40980d (diff)
parent8d605b8ee84125fe623832f39d055e52130bb590 (diff)
downloadrails-8c8e9b34d576d2b223345d9073aca28c7975ecd7.tar.gz
rails-8c8e9b34d576d2b223345d9073aca28c7975ecd7.tar.bz2
rails-8c8e9b34d576d2b223345d9073aca28c7975ecd7.zip
Merge pull request #19700 from tancnle/trivial-shallow-nesting-depth-count
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 34b5b48f3a..49009a45cc 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1678,7 +1678,7 @@ module ActionDispatch
end
def shallow_nesting_depth #:nodoc:
- @nesting.select(&:shallow?).size
+ @nesting.count(&:shallow?)
end
def param_constraint? #:nodoc: