diff --git a/plugins/commands/serve/util/has_broker.rb b/plugins/commands/serve/util/has_broker.rb index 42122376e..402f17c53 100644 --- a/plugins/commands/serve/util/has_broker.rb +++ b/plugins/commands/serve/util/has_broker.rb @@ -12,7 +12,12 @@ module VagrantPlugins @broker = opts.delete(:broker) raise ArgumentError, "Expected `Broker' to be provided" if @broker.nil? - super + + if self.method(:initialize).super_method.parameters.empty? + super() + else + super + end end end end diff --git a/plugins/commands/serve/util/has_logger.rb b/plugins/commands/serve/util/has_logger.rb index decd36eae..1b096e3b4 100644 --- a/plugins/commands/serve/util/has_logger.rb +++ b/plugins/commands/serve/util/has_logger.rb @@ -10,7 +10,12 @@ module VagrantPlugins def initialize(*args, **opts, &block) @logger = Log4r::Logger.new(self.class.name.downcase) - super + + if self.method(:initialize).super_method.parameters.empty? + super() + else + super + end end end end diff --git a/plugins/commands/serve/util/has_mapper.rb b/plugins/commands/serve/util/has_mapper.rb index 49decc5ee..84e3b87b0 100644 --- a/plugins/commands/serve/util/has_mapper.rb +++ b/plugins/commands/serve/util/has_mapper.rb @@ -14,7 +14,12 @@ module VagrantPlugins if respond_to?(:broker) @mapper.add_argument(broker) end - super + + if self.method(:initialize).super_method.parameters.empty? + super() + else + super + end end end end