1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

initialize ivars

This commit is contained in:
Aaron Patterson 2011-03-01 13:28:59 -08:00
parent 24faddd60c
commit 50ed1a25a4

View file

@ -4,7 +4,7 @@ module ActionDispatch
class FileHandler class FileHandler
def initialize(at, root) def initialize(at, root)
@at, @root = at.chomp('/'), root.chomp('/') @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)}/ @compiled_root = /^#{Regexp.escape(root)}/
@file_server = ::Rack::File.new(@root) @file_server = ::Rack::File.new(@root)
end end