From 332fcfaf6bee6b3ae0911e9bbe24ded9af757868 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Mon, 5 Jun 2006 14:31:38 +0000 Subject: Make sure regexp chunks are grouped when the segment has a regexp constraint so that captures are counted correctly (closes #5267) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/routing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/routing.rb') diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index b7eb603463..9628c1f0ad 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -489,7 +489,7 @@ module ActionController Regexp.new "\\A#{regexp.source}\\Z" if regexp end def regexp_chunk - regexp ? regexp.source : "([^#{Routing::SEPARATORS.join}]+)" + regexp ? "(#{regexp.source})" : "([^#{Routing::SEPARATORS.join}]+)" end def build_pattern(pattern) -- cgit v1.2.3