diff options
author | Jamis Buck <jamis@37signals.com> | 2006-06-05 14:31:38 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-06-05 14:31:38 +0000 |
commit | 332fcfaf6bee6b3ae0911e9bbe24ded9af757868 (patch) | |
tree | 3cb23140f478836e75d9de1a6c447e5e1320e1ab /actionpack/lib/action_controller | |
parent | 7d88146e9ed908d663786a45c87cdeaa56135a39 (diff) | |
download | rails-332fcfaf6bee6b3ae0911e9bbe24ded9af757868.tar.gz rails-332fcfaf6bee6b3ae0911e9bbe24ded9af757868.tar.bz2 rails-332fcfaf6bee6b3ae0911e9bbe24ded9af757868.zip |
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
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |