System superclass check can be done prior to instantiating

This also fixes a 1.8.7 incompatibility.
This commit is contained in:
Mitchell Hashimoto 2011-01-11 11:45:39 -08:00
parent b302053f6e
commit 627b75d945
1 changed files with 1 additions and 1 deletions

View File

@ -53,8 +53,8 @@ module Vagrant
system ||= env.config.vm.system
if system.is_a?(Class)
raise Errors::VMSystemError, :_key => :invalid_class, :system => system.to_s if !(system <= Systems::Base)
@system = system.new(self)
raise Errors::VMSystemError, :_key => :invalid_class, :system => system.to_s if !@system.is_a?(Systems::Base)
elsif system.is_a?(Symbol)
# Hard-coded internal systems
mapping = {