mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Simplify regexp
This commit is contained in:
@@ -38,7 +38,7 @@ module ActionDispatch
|
||||
end
|
||||
|
||||
def escape_glob_chars(path)
|
||||
path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1")
|
||||
path.gsub(/[*?{}\[\]]/, "\\\\\\&")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user