Skip to content

Commit f85d1e5

Browse files
committed
Fixing crash when set ':at' parameter such as "12:"
1 parent d0648b0 commit f85d1e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/forever/job.rb

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def parse_at(*args)
4242
raise "#{at} must be a string" unless at.is_a?(String)
4343
raise "#{at} has not a colon separator" unless at =~ /:/
4444
hour, min = at.split(":")
45+
min = '' if min.nil?
4546
raise "Failed to parse #{at}" if hour.to_i >= 24 || min.to_i >= 60
4647
[hour, min]
4748
end

0 commit comments

Comments
 (0)