From 0b3a1f1ad03b40048adaa44bba82c47db2f024d6 Mon Sep 17 00:00:00 2001 From: Semyon Pupkov Date: Tue, 4 Jul 2017 15:02:13 +0500 Subject: [PATCH] fix: proper convert hash in args with priority in retry --- lib/resque/integration/unique.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resque/integration/unique.rb b/lib/resque/integration/unique.rb index ff9753c..86f6b24 100644 --- a/lib/resque/integration/unique.rb +++ b/lib/resque/integration/unique.rb @@ -66,7 +66,7 @@ def retry_identifier(*args) return if args.empty? - args = [*args[0..-2], args.last.with_indifferent_access] if args.last.is_a?(Hash) + args = args.map { |i| i.is_a?(Hash) ? i.with_indifferent_access : i } Digest::SHA1.hexdigest(obj_to_string(lock_on[*args])) end