Skip to content

Commit

Permalink
do not use Array.wrap while running failure hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
elie committed Jun 6, 2012
1 parent fc0e2db commit 025245e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/resque/job.rb
Expand Up @@ -217,7 +217,8 @@ def failure_hooks

def run_failure_hooks(exception)
begin
failure_hooks.each { |hook| payload_class.send(hook, exception, *Array.wrap(args)) } unless @failure_hooks_ran
job_args = args || []
failure_hooks.each { |hook| payload_class.send(hook, exception, *job_args) } unless @failure_hooks_ran
ensure
@failure_hooks_ran = true
end
Expand Down

0 comments on commit 025245e

Please sign in to comment.