From 1b4e6ca9d86ef39f17feef50e525f96706a8fc09 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 17 Feb 2012 14:44:28 +0000 Subject: Simplify regexp --- actionpack/lib/action_dispatch/middleware/static.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/middleware/static.rb') 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 -- cgit v1.2.3