aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/static.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2012-02-17 14:44:28 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2012-02-17 14:44:28 +0000
commitb9ad097565968332acb6e91fc602459f035639a9 (patch)
treeab564c355e8a91a51cf567c485ed91f9c1c14cc1 /actionpack/lib/action_dispatch/middleware/static.rb
parentceb288b8ce552a248f141bddbd16426641a4fd0d (diff)
downloadrails-b9ad097565968332acb6e91fc602459f035639a9.tar.gz
rails-b9ad097565968332acb6e91fc602459f035639a9.tar.bz2
rails-b9ad097565968332acb6e91fc602459f035639a9.zip
Simplify regexp
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/static.rb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/static.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb
index cb251bca6f..63b7422287 100644
--- a/actionpack/lib/action_dispatch/middleware/static.rb
+++ b/actionpack/lib/action_dispatch/middleware/static.rb
@@ -39,7 +39,7 @@ module ActionDispatch
end
def escape_glob_chars(path)
- path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1")
+ path.gsub(/[*?{}\[\]]/, "\\\\\\&")
end
end