diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2012-02-17 14:44:28 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2012-02-17 14:44:28 +0000 |
commit | b9ad097565968332acb6e91fc602459f035639a9 (patch) | |
tree | ab564c355e8a91a51cf567c485ed91f9c1c14cc1 /actionpack | |
parent | ceb288b8ce552a248f141bddbd16426641a4fd0d (diff) | |
download | rails-b9ad097565968332acb6e91fc602459f035639a9.tar.gz rails-b9ad097565968332acb6e91fc602459f035639a9.tar.bz2 rails-b9ad097565968332acb6e91fc602459f035639a9.zip |
Simplify regexp
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 |
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 |