Skip to content

Commit

Permalink
Merge pull request #22890 from DNNX/times-map
Browse files Browse the repository at this point in the history
Replace x.times.map{} with Array.new(x){} in AD::Journey::Path::Pattern
  • Loading branch information
spastorino committed Jan 3, 2016
2 parents 3273c61 + 20aef99 commit 3d590ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/journey/path/pattern.rb
Expand Up @@ -124,7 +124,7 @@ def initialize(names, offsets, match)
end

def captures
(length - 1).times.map { |i| self[i + 1] }
Array.new(length - 1) { |i| self[i + 1] }
end

def [](x)
Expand Down

0 comments on commit 3d590ad

Please sign in to comment.