From c00e7aa919624e4f26a6bc0a924892a87dbd91c0 Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Mon, 10 Dec 2012 23:04:51 -0500 Subject: [PATCH] Match the controller and path names defensively. Use '\A' instead of '^', and make the alteration shorter. --- actionpack/lib/action_dispatch/routing/inspector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index d7412daec2a25..8d7461ecc3f93 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -51,7 +51,7 @@ def action end def internal? - controller =~ %r{^rails/info|^rails/welcome} || path =~ %r{^#{Rails.application.config.assets.prefix}} + controller =~ %r{\Arails/(info|welcome)} || path =~ %r{\A#{Rails.application.config.assets.prefix}} end def engine?