mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Simplify regexp
This commit is contained in:
parent
ceb288b8ce
commit
b9ad097565
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def escape_glob_chars(path)
|
||||
path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1")
|
||||
path.gsub(/[*?{}\[\]]/, "\\\\\\&")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue