Make some fixes to get tests passing on Ruby 1.8.7

This commit is contained in:
Mitchell Hashimoto 2011-12-26 17:45:55 -08:00
parent 43fcca3dcb
commit 0887a18079
2 changed files with 5 additions and 1 deletions

View File

@ -68,6 +68,10 @@ module Vagrant
def finalize_action(action, env)
klass, args, block = action
# Default the arguments to an empty array. Otherwise in Ruby 1.8
# a `nil` args will actually pass `nil` into the class.
args ||= []
if klass.is_a?(Class)
# A action klass which is to be instantiated with the
# app, env, and any arguments given

View File

@ -175,7 +175,7 @@ module Vagrant
#
# @return [Action::Runner]
def action_runner
@action_runner ||= Action::Runner.new(action_registry) do |env|
@action_runner ||= Action::Runner.new(action_registry) do
{
:action_runner => action_runner,
:box_collection => boxes,