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 ceb288b commit b9ad097
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 @@ -39,7 +39,7 @@ def unescape_path(path)
end

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

Expand Down

0 comments on commit b9ad097

Please sign in to comment.