Skip to content

Commit 0e8ee78

Browse files
committed
Merge pull request resque#612 from mrzor/1-x-stable_no_array_wrap
1.x : no array wrap while running failure hooks
2 parents fc0e2db + 025245e commit 0e8ee78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/resque/job.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ def failure_hooks
217217

218218
def run_failure_hooks(exception)
219219
begin
220-
failure_hooks.each { |hook| payload_class.send(hook, exception, *Array.wrap(args)) } unless @failure_hooks_ran
220+
job_args = args || []
221+
failure_hooks.each { |hook| payload_class.send(hook, exception, *job_args) } unless @failure_hooks_ran
221222
ensure
222223
@failure_hooks_ran = true
223224
end

0 commit comments

Comments
 (0)