diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-06-24 13:52:44 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-06-24 13:52:44 +0100 |
commit | 353a8c02ef26caa5d4c6acf816f228da507d78ac (patch) | |
tree | 9f51335ddd74933e3b5b9a9ba91e1c2d89e089e4 /lib/custodian/util | |
parent | a068ab0cceaf3b68c731bfd8384ddf352f0f2795 (diff) |
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.
Diffstat (limited to 'lib/custodian/util')
-rwxr-xr-x | lib/custodian/util/timespan.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |