1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Fix for fix #688 to work with Ruby 1.8

This commit is contained in:
Florian René Hanke 2013-03-21 10:23:51 +11:00
parent 4f2553bbd3
commit 6c41a20169

View file

@ -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|