lib/dry/auto_inject/strategies/kwargs.rb in dry-auto_inject-0.6.1 vs lib/dry/auto_inject/strategies/kwargs.rb in dry-auto_inject-0.7.0
- old
+ new
@@ -48,11 +48,11 @@
assign_dependencies.(kwargs, self)
super_kwargs = slice_kwargs.(kwargs, super_parameters)
if super_kwargs.any?
- super(super_kwargs)
+ super(**super_kwargs)
else
super()
end
end
end
@@ -65,15 +65,15 @@
instance_mod.class_exec do
define_method :initialize do |*args, **kwargs|
assign_dependencies.(kwargs, self)
if super_parameters.splat?
- super(*args, kwargs)
+ super(*args, **kwargs)
else
super_kwargs = slice_kwargs.(kwargs, super_parameters)
if super_kwargs.any?
- super(*args, super_kwargs)
+ super(*args, **super_kwargs)
else
super(*args)
end
end
end