Simplify regexp

This commit is contained in:
Andrew White
2012-02-17 14:44:28 +00:00
parent 86d3bc37b8
commit 1b4e6ca9d8

View File

@@ -38,7 +38,7 @@ module ActionDispatch
end
def escape_glob_chars(path)
path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1")
path.gsub(/[*?{}\[\]]/, "\\\\\\&")
end
end