jmettraux/rufus-scheduler — pull request #58 by AimeeRose (2013-05-28 22:36:52+00:00)
Title: Return range max for istart when istart > max in #parse_range

This PR resolves issue where Rufus::CronLine.new uses #parse_range and returns an invalid value for respective seconds, minutes and hours ranges.

Currently:
```
c = Rufus::CronLine.new("60-62 * * * *")
=> @minutes = [60]
c = Rufus::CronLine.new("* 25-26 * * *")
=> @hours = [25]
```

Both of these objects will loop forever when calling ```c.next_time```.

This PR ensures the values returned for istart are no greater than the max value for their ranges.

So that
```
c = Rufus::CronLine.new("60-62 * * * *")
=> @minutes=[59]
irb(main):003:0> c = Rufus::CronLine.new("* 25-26 * * *")
=> @hours=[23]