From e530108b6ac2e5cac6c1979782725e5aea6c8038 Mon Sep 17 00:00:00 2001 From: Lucas Heinlen Date: Mon, 24 Feb 2014 15:28:50 -0500 Subject: [PATCH] Do not to_s the machine id if it is nil When destroying a machine, the machine id is set to nil, the to_s causes it to be set to empty string. This can cause inconsistent behavior in anything (such as plugins) that tests the machine id. --- lib/vagrant/machine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/machine.rb b/lib/vagrant/machine.rb index 3ca3b4e23..ec4d11d91 100644 --- a/lib/vagrant/machine.rb +++ b/lib/vagrant/machine.rb @@ -230,7 +230,7 @@ module Vagrant end # Store the ID locally - @id = value.to_s + @id = value.nil? ? nil : value.to_s # Notify the provider that the ID changed in case it needs to do # any accounting from it.