1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Use public_send, fixes #1923

This commit is contained in:
Mike Perham 2014-09-03 15:57:55 -07:00
parent 77064c381c
commit 3943082e23

View file

@ -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