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:45:48 +0000 |
commit | 1b4e6ca9d86ef39f17feef50e525f96706a8fc09 (patch) | |
tree | 468ac8ca27f5a32957cd3cac7fff0d3258b2c746 /actionpack | |
parent | 86d3bc37b8f302e8dbe5ad1095ea2723fc87f8c0 (diff) | |
download | rails-1b4e6ca9d86ef39f17feef50e525f96706a8fc09.tar.gz rails-1b4e6ca9d86ef39f17feef50e525f96706a8fc09.tar.bz2 rails-1b4e6ca9d86ef39f17feef50e525f96706a8fc09.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 531edb27ba..31185fec07 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -38,7 +38,7 @@ module ActionDispatch end def escape_glob_chars(path) - path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1") + path.gsub(/[*?{}\[\]]/, "\\\\\\&") end end |