Fixed route compile never fully coercing to String
This commit is contained in:
parent
d5a4d472c4
commit
0a6927cad0
|
@ -794,7 +794,7 @@ module Sinatra
|
||||||
if path.respond_to? :to_str
|
if path.respond_to? :to_str
|
||||||
special_chars = %w{. + ( )}
|
special_chars = %w{. + ( )}
|
||||||
pattern =
|
pattern =
|
||||||
path.gsub(/((:\w+)|[\*#{special_chars.join}])/) do |match|
|
path.to_str.gsub(/((:\w+)|[\*#{special_chars.join}])/) do |match|
|
||||||
case match
|
case match
|
||||||
when "*"
|
when "*"
|
||||||
keys << 'splat'
|
keys << 'splat'
|
||||||
|
|
Loading…
Reference in New Issue