From 59b24ceb0c558715714e272737ca0ca06f6043d5 Mon Sep 17 00:00:00 2001 From: Paul Barry Date: Fri, 25 Jun 2010 22:01:56 -0400 Subject: Fixed normalize_path in Routing::Mapper to handle optional prefix segments with static and dynamic parts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/routing') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 0d22716ba7..ca57c302ef 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -194,7 +194,7 @@ module ActionDispatch # for root cases, where the latter is the correct one. def self.normalize_path(path) path = Rack::Mount::Utils.normalize_path(path) - path.sub!(%r{/(\(+)/?:}, '\1/:') unless path =~ %r{^/\(+:.*\)$} + path.sub!(%r{/(\(+)/?([^:]*):}, '\1/\2:') unless path =~ %r{^/\(+:.*\)$} path end -- cgit v1.2.3