diff --git a/lib/fluent/compat/call_super_mixin.rb b/lib/fluent/compat/call_super_mixin.rb index 24be38e112..2db2ced679 100644 --- a/lib/fluent/compat/call_super_mixin.rb +++ b/lib/fluent/compat/call_super_mixin.rb @@ -41,7 +41,7 @@ def self.prepended(klass) def start super unless self.started? - @@_super_start[self.class].bind(self).call + @@_super_start[self.class].bind_call(self) # #super will reset logdev (especially in test), so this warn should be after calling it log.warn "super was not called in #start: called it forcedly", plugin: self.class end @@ -51,7 +51,7 @@ def before_shutdown super unless self.before_shutdown? log.warn "super was not called in #before_shutdown: calling it forcedly", plugin: self.class - @@_super_before_shutdown[self.class].bind(self).call + @@_super_before_shutdown[self.class].bind_call(self) end end @@ -68,7 +68,7 @@ def shutdown super unless self.shutdown? log.warn "super was not called in #shutdown: calling it forcedly", plugin: self.class - @@_super_shutdown[self.class].bind(self).call + @@_super_shutdown[self.class].bind_call(self) end end end diff --git a/lib/fluent/compat/propagate_default.rb b/lib/fluent/compat/propagate_default.rb index 71f57e372f..dc42f6e14a 100644 --- a/lib/fluent/compat/propagate_default.rb +++ b/lib/fluent/compat/propagate_default.rb @@ -33,25 +33,25 @@ module ClassMethods CONFIGURABLE_CLASS_METHODS = Fluent::Configurable::ClassMethods def config_param(name, type = nil, **kwargs, &block) - CONFIGURABLE_CLASS_METHODS.instance_method(:config_param).bind(self).call(name, type, **kwargs, &block) + CONFIGURABLE_CLASS_METHODS.instance_method(:config_param).bind_call(self, name, type, **kwargs, &block) pparams = propagate_default_params if kwargs.has_key?(:default) && pparams[name.to_s] newer = pparams[name.to_s].to_sym overridden_default_value = kwargs[:default] - CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).bind(self).call(:buffer) do + CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).bind_call(self, :buffer) do config_set_default newer, overridden_default_value end end end def config_set_default(name, defval) - CONFIGURABLE_CLASS_METHODS.instance_method(:config_set_default).bind(self).call(name, defval) + CONFIGURABLE_CLASS_METHODS.instance_method(:config_set_default).bind_call(self, name, defval) pparams = propagate_default_params if pparams[name.to_s] newer = pparams[name.to_s].to_sym - CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).bind(self).call(:buffer) do + CONFIGURABLE_CLASS_METHODS.instance_method(:config_section).bind_call(self, :buffer) do self.config_set_default newer, defval end end