early occurrence with dtstart leads to infinite program run

12 views
Skip to first unread message

icem

unread,
Nov 18, 2010, 1:38:05 PM11/18/10
to RiCal
This code in rails console leads to infinite program run in
occurrences method.

time = Time.parse("Fri Nov 19 18:00:00 UTC 2010").utc
event = RiCal.Event do
dtstart time
dtend time + 30.minutes
add_rrule "FREQ=YEARLY;BYMONTH=5;BYMONTHDAY=7;INTERVAL=2"
end
event.occurrences(:count => 3).map(&:start_time)

Also I've tried to run this test
https://github.com/rubyredrick/ri_cal/blob/master/spec/ri_cal/inf_l...
but with dtstart property changed from "DTSTART;VALUE=DATE:19400713"
to "DTSTART:19701018T000000" in VEVENT section(and DTEND property
too), and the result was the same (infinite run).

Is there is a way to avoid this bug?
ps. I'm using RiCal as a gem, version 0.8.7

Yury Otcheski

unread,
Feb 8, 2011, 6:52:54 AM2/8/11
to RiCal
I found some workaround on this issue. This bug occurs only in yearly recurrence type, and when dtstart doesn't equal to first rrule occurrence. So when I changed rrule to add_rrule "FREQ=YEARLY;BYMONTH=11;BYMONTHDAY=19;INTERVAL=2" it works correct. (Because dtstart set to Nov 19 2010)

2010/11/18 icem <otch...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "RiCal" group.
To post to this group, send email to rica...@googlegroups.com.
To unsubscribe from this group, send email to rical_gem+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rical_gem?hl=en.


Reply all
Reply to author
Forward
0 new messages