Skip to content

Commit 752d5ec

Browse files
committed
Return a proper Fixnum from validation
1 parent 73f08ad commit 752d5ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ice_cube/validations/weekly_interval.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def validate(step_time, schedule)
3939
d1 = Date.new(t1.year, t1.month, t1.day)
4040
days = (d1 - TimeUtil.normalize_wday(d1.wday, week_start)) -
4141
(d0 - TimeUtil.normalize_wday(d0.wday, week_start))
42-
offset = ((days / 7) % interval).nonzero?
42+
offset = ((days.to_i / 7) % interval).nonzero?
4343
(interval - offset) * 7 if offset
4444
end
4545

0 commit comments

Comments
 (0)