From 353a8c02ef26caa5d4c6acf816f228da507d78ac Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 24 Jun 2013 13:52:44 +0100 Subject: The worst-case for testing a time-period, and one used in the parser test, is matching against a period that covers the full 24 hours. Correctly terminate this case, and add a new test-case to ensure that this is always correct. --- lib/custodian/util/timespan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/custodian/util/timespan.rb') diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb index a43ca55..27ece7a 100755 --- a/lib/custodian/util/timespan.rb +++ b/lib/custodian/util/timespan.rb @@ -78,7 +78,7 @@ module Custodian while( hour != p_end ) valid[hour] = 1 hour += 1 - hour = 0 if ( hour >= 23 ) + hour = 0 if ( hour > 23 ) end valid[p_end]=1 -- cgit v1.2.1