diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2016-01-03 20:23:50 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2016-01-03 20:23:50 -0300 |
commit | 3d590add45b7ff1de972d99b076cb504d5208935 (patch) | |
tree | 4e1fcebb3708f26c0a9eba178ca63a67932ee579 /actionpack | |
parent | 3273c61b2b203ba1b1c42c76f2e5e8fad531862e (diff) | |
parent | 20aef99f7bd136f156bf4b3808626398013f22f5 (diff) | |
download | rails-3d590add45b7ff1de972d99b076cb504d5208935.tar.gz rails-3d590add45b7ff1de972d99b076cb504d5208935.tar.bz2 rails-3d590add45b7ff1de972d99b076cb504d5208935.zip |
Merge pull request #22890 from DNNX/times-map
Replace x.times.map{} with Array.new(x){} in AD::Journey::Path::Pattern
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/path/pattern.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index 5ee8810066..018b89a2b7 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -124,7 +124,7 @@ module ActionDispatch end def captures - (length - 1).times.map { |i| self[i + 1] } + Array.new(length - 1) { |i| self[i + 1] } end def [](x) |