From 0a6927cad0dd00a4d4b8f926d4d26c9b0db3e61e Mon Sep 17 00:00:00 2001 From: Bob Aman Date: Fri, 1 May 2009 10:44:24 -0400 Subject: [PATCH] Fixed route compile never fully coercing to String --- lib/sinatra/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index 14284f63..fd7a67a6 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -794,7 +794,7 @@ module Sinatra 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'