From 627b75d945a482f4062ab6a58fc4f660a9e62128 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 11 Jan 2011 11:45:39 -0800 Subject: [PATCH] System superclass check can be done prior to instantiating This also fixes a 1.8.7 incompatibility. --- lib/vagrant/vm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/vm.rb b/lib/vagrant/vm.rb index ff29c6dcc..691f35361 100644 --- a/lib/vagrant/vm.rb +++ b/lib/vagrant/vm.rb @@ -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 = {