Skip to content
Browse files

Fixed route compile never fully coercing to String

  • Loading branch information...
1 parent d5a4d47 commit 0a6927cad0dd00a4d4b8f926d4d26c9b0db3e61e @sporkmonger sporkmonger committed with rtomayko May 1, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sinatra/base.rb
View
2 lib/sinatra/base.rb
@@ -794,7 +794,7 @@ def compile(path)
if path.respond_to? :to_str
special_chars = %w{. + ( )}
pattern =
- path.gsub(/((:\w+)|[\*#{special_chars.join}])/) do |match|
+ path.to_str.gsub(/((:\w+)|[\*#{special_chars.join}])/) do |match|
case match
when "*"
keys << 'splat'

0 comments on commit 0a6927c

Please sign in to comment.
Something went wrong with that request. Please try again.