From 847cbb9ed32d8f0580d51739e8d83a6e71247f8f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 18 Mar 2013 21:34:37 -0700 Subject: [PATCH] Allow anything that can #to-s for Vagrant.plugin --- lib/vagrant.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/vagrant.rb b/lib/vagrant.rb index df29eb0bc..ba8ee47b1 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -144,11 +144,13 @@ module Vagrant # Vagrant may move it to "Vagrant::Plugins::V1" and plugins will not be # affected. # + # @param [String] version + # @param [String] component # @return [Class] def self.plugin(version, component=nil) # Build up the key and return a result - key = version.to_sym - key = [key, component.to_sym] if component + key = version.to_s.to_sym + key = [key, component.to_s.to_sym] if component result = PLUGIN_COMPONENTS.get(key) # If we found our component then we return that