diff --git a/lib/sidekiq/extensions/action_mailer.rb b/lib/sidekiq/extensions/action_mailer.rb index 18469e72..c1688b94 100644 --- a/lib/sidekiq/extensions/action_mailer.rb +++ b/lib/sidekiq/extensions/action_mailer.rb @@ -14,7 +14,7 @@ module Sidekiq def perform(yml) (target, method_name, args) = YAML.load(yml) - msg = target.__send__(method_name, *args) + msg = target.public_send(method_name, *args) # The email method can return nil, which causes ActionMailer to return # an undeliverable empty message. msg.deliver if msg && (msg.to || msg.cc || msg.bcc) && msg.from