aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/route.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-10 19:53:53 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-10 22:21:09 -0800
commit278b6cd9529f33286449a9be18f1903687814d3f (patch)
tree7ecff6aeef0e2b9b956e8d2b9902cc21aa872183 /actionpack/lib/action_controller/routing/route.rb
parent5db9f9b3ad47fadf0b3f12ada1c2ea7b9c15ded5 (diff)
downloadrails-278b6cd9529f33286449a9be18f1903687814d3f.tar.gz
rails-278b6cd9529f33286449a9be18f1903687814d3f.tar.bz2
rails-278b6cd9529f33286449a9be18f1903687814d3f.zip
Eliminate excess Regexp creation due to capture counting
Diffstat (limited to 'actionpack/lib/action_controller/routing/route.rb')
-rw-r--r--actionpack/lib/action_controller/routing/route.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing/route.rb b/actionpack/lib/action_controller/routing/route.rb
index 3b2cb28545..a610ec7e84 100644
--- a/actionpack/lib/action_controller/routing/route.rb
+++ b/actionpack/lib/action_controller/routing/route.rb
@@ -219,7 +219,7 @@ module ActionController
next_capture = 1
extraction = segments.collect do |segment|
x = segment.match_extraction(next_capture)
- next_capture += Regexp.new(segment.regexp_chunk).number_of_captures
+ next_capture += segment.number_of_captures
x
end
extraction.compact