Skip to content

Commit 855b2e6

Browse files
committed
Protect our sleep interval with a Float()
1 parent b4fcfa7 commit 855b2e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def validate_queues
109109
# Also accepts a block which will be passed the job as soon as it
110110
# has completed processing. Useful for testing.
111111
def work(interval = 5.0, &block)
112-
interval = interval.to_f
112+
interval = Float(interval)
113113
$0 = "resque: Starting"
114114
startup
115115

0 commit comments

Comments
 (0)