Skip to content

Commit

Permalink
Simplify regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed Feb 17, 2012
1 parent 86d3bc3 commit 1b4e6ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/middleware/static.rb
Expand Up @@ -38,7 +38,7 @@ def unescape_path(path)
end end


def escape_glob_chars(path) def escape_glob_chars(path)
path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1") path.gsub(/[*?{}\[\]]/, "\\\\\\&")
end end
end end


Expand Down

0 comments on commit 1b4e6ca

Please sign in to comment.