diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-01 13:28:59 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-01 17:20:35 -0800 |
commit | 50ed1a25a4e496a7a67861b1a04d667bd3445bb6 (patch) | |
tree | 2f4de627e1e0b944491c669917cb8a09b3ac9d71 /actionpack/lib/action_dispatch | |
parent | 24faddd60c5fd148c8264898aeca2d5f36b25a4b (diff) | |
download | rails-50ed1a25a4e496a7a67861b1a04d667bd3445bb6.tar.gz rails-50ed1a25a4e496a7a67861b1a04d667bd3445bb6.tar.bz2 rails-50ed1a25a4e496a7a67861b1a04d667bd3445bb6.zip |
initialize ivars
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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 5076567bd4..c57f694c4d 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -4,7 +4,7 @@ module ActionDispatch class FileHandler def initialize(at, root) @at, @root = at.chomp('/'), root.chomp('/') - @compiled_at = /^#{Regexp.escape(at)}/ unless @at.blank? + @compiled_at = @at.blank? ? nil : /^#{Regexp.escape(at)}/ @compiled_root = /^#{Regexp.escape(root)}/ @file_server = ::Rack::File.new(@root) end |