Permalink
Browse files

Fix for fix #688 to work with Ruby 1.8

  • Loading branch information...
1 parent 4f2553b commit 6c41a201690917f9384b48b6cec3dd0785ee9ba1 @floere floere committed Mar 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sinatra/base.rb
View
@@ -1416,7 +1416,7 @@ def compile!(verb, path, block, options = {})
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|

0 comments on commit 6c41a20

Please sign in to comment.