From 6c41a201690917f9384b48b6cec3dd0785ee9ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ren=C3=A9=20Hanke?= Date: Thu, 21 Mar 2013 10:23:51 +1100 Subject: [PATCH] Fix for fix #688 to work with Ruby 1.8 --- 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 2d5a6ab0..e9864639 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -1416,7 +1416,7 @@ module Sinatra def compile(path) if path.respond_to? :to_str keys = [] - postfix = '/' if path[-1] == '/' + postfix = '/' if path =~ /\/\z/ segments = path.split('/').map! do |segment| ignore = "" pattern = segment.to_str.gsub(/[^\?\%\\\/\:\*\w]/) do |c|