This fixes an issue with Ruby 2.6 where `super` usage when no
arguments are passed results in an argument error
28 lines
595 B
Ruby
28 lines
595 B
Ruby
module VagrantPlugins
|
|
module CommandServe
|
|
module Util
|
|
# Adds mapper initialization and will include
|
|
module HasMapper
|
|
def mapper
|
|
@mapper
|
|
end
|
|
|
|
def initialize(*args, **opts, &block)
|
|
@cacher = Cacher.new
|
|
@mapper = Mappers.new
|
|
@mapper.cacher = @cacher
|
|
if respond_to?(:broker)
|
|
@mapper.add_argument(broker)
|
|
end
|
|
|
|
if self.method(:initialize).super_method.parameters.empty?
|
|
super()
|
|
else
|
|
super
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|