From efd3dd752ea22928ef0dc4f5c791e43de4be3118 Mon Sep 17 00:00:00 2001 From: Dan Hixon Date: Sat, 19 Dec 2009 06:29:22 +0800 Subject: [PATCH] bugfix: http://github.com/javan/whenever/issues#issue/32 - comparison Time with 0 failed --- lib/whenever/outputs/cron.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/whenever/outputs/cron.rb b/lib/whenever/outputs/cron.rb index 0217e7a..03110d0 100644 --- a/lib/whenever/outputs/cron.rb +++ b/lib/whenever/outputs/cron.rb @@ -60,7 +60,7 @@ module Whenever end if shortcut - if @at > 0 + if @at.is_a?(Time) || (@at.is_a?(Numeric) && @at>0) raise ArgumentError, "You cannot specify an ':at' when using the shortcuts for times." else return shortcut