aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
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:45:48 +0000
commit1b4e6ca9d86ef39f17feef50e525f96706a8fc09 (patch)
tree468ac8ca27f5a32957cd3cac7fff0d3258b2c746 /actionpack/lib/action_dispatch
parent86d3bc37b8f302e8dbe5ad1095ea2723fc87f8c0 (diff)
downloadrails-1b4e6ca9d86ef39f17feef50e525f96706a8fc09.tar.gz
rails-1b4e6ca9d86ef39f17feef50e525f96706a8fc09.tar.bz2
rails-1b4e6ca9d86ef39f17feef50e525f96706a8fc09.zip
Simplify regexp
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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 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