core: Fix hooking when using a `Method` object as a callable on action runner

This commit is contained in:
Fabio Rehm 2013-12-02 22:43:25 -02:00
parent aff26b832d
commit ae472dece9
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Vagrant
def run(callable_id, options=nil)
callable = callable_id
callable = Builder.build(callable_id) if callable_id.kind_of?(Class)
callable = Builder.build(callable_id) if callable_id.kind_of?(Class) || callable_id.is_a?(Method)
raise ArgumentError, "Argument to run must be a callable object or registered action." if !callable || !callable.respond_to?(:call)
# Create the initial environment with the options given