lib/delayed/performable_method.rb in delayed_job-4.0.2 vs lib/delayed/performable_method.rb in delayed_job-4.0.3

- old
+ new

@@ -8,11 +8,11 @@ def initialize(object, method_name, args) raise NoMethodError, "undefined method `#{method_name}' for #{object.inspect}" unless object.respond_to?(method_name, true) if object.respond_to?(:persisted?) && !object.persisted? - raise(ArgumentError, 'Jobs cannot be created for non-persisted records') + raise ArgumentError, 'Jobs cannot be created for non-persisted records' end self.object = object self.args = args self.method_name = method_name.to_sym @@ -28,10 +28,10 @@ def method_missing(symbol, *args) object.send(symbol, *args) end - def respond_to?(symbol, include_private=false) + def respond_to?(symbol, include_private = false) super || object.respond_to?(symbol, include_private) end end end