add support for named captures

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
Steve Price 2011-01-23 20:26:08 -06:00 committed by Konstantin Haase
parent 5467056237
commit 8d0fb79c59
1 changed files with 2 additions and 0 deletions

View File

@ -1090,6 +1090,8 @@ module Sinatra
[/^#{pattern}$/, keys]
elsif path.respond_to?(:keys) && path.respond_to?(:match)
[path, path.keys]
elsif path.respond_to?(:names) && path.respond_to?(:match)
[path, path.names]
elsif path.respond_to? :match
[path, keys]
else