aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/routing.rb2
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)