fixing regexp warnings

This commit is contained in:
Aaron Patterson
2010-09-29 18:23:33 -07:00
parent 29c32e8329
commit 7e057d11aa

View File

@@ -349,7 +349,7 @@ module ActionDispatch
options = args.last.is_a?(Hash) ? args.pop : {}
path = args.shift || block
path_proc = path.is_a?(Proc) ? path : proc { |params| (params.empty? || !path.match(/%{\w*}/)) ? path : (path % params) }
path_proc = path.is_a?(Proc) ? path : proc { |params| (params.empty? || !path.match(/%\{\w*\}/)) ? path : (path % params) }
status = options[:status] || 301
lambda do |env|