1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Simplify regexp

This commit is contained in:
Andrew White 2012-02-17 14:44:28 +00:00
parent ceb288b8ce
commit b9ad097565

View file

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