lib/rack/urlmap.rb in rack-2.2.4 vs lib/rack/urlmap.rb in rack-2.2.5
- old
+ new
@@ -33,10 +33,10 @@
unless location[0] == ?/
raise ArgumentError, "paths need to start with /"
end
location = location.chomp('/')
- match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", nil, 'n')
+ match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", Regexp::NOENCODING)
[host, location, match, app]
}.sort_by do |(host, location, _, _)|
[host ? -host.size : Float::INFINITY, -location.size]
end