You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marshal.dump fails when applied to Calendar objects with error can't dump hash with default proc (TypeError).
Here is an example that fails with the mentioned error:
require 'icalendar'
# Create a calendar with an event (standard method)
cal = Icalendar::Calendar.new
cal.event do |e|
e.dtstart = Icalendar::Values::Date.new('20050428')
e.dtend = Icalendar::Values::Date.new('20050429')
e.summary = "Meeting with the man."
e.description = "Have a long lunch meeting and decide nothing..."
e.ip_class = "PRIVATE"
end
Marshal.dump(cal)
Marshalling worked fine with v. 1.5.
The text was updated successfully, but these errors were encountered:
sl1974
changed the title
Marshalling doesn't work.
Marshal.dump fails
Jul 22, 2014
We have no plans to support Marshal.dump on iCalendar objects.
As an alternative, you can just use cal.to_ical to get a string representation that can completely rebuild your object structure with Icalendar.parse (or the Icalendar::Parser class for more tricky cases)
Marshal.dump fails when applied to Calendar objects with error
can't dump hash with default proc (TypeError)
.Here is an example that fails with the mentioned error:
Marshalling worked fine with v. 1.5.
The text was updated successfully, but these errors were encountered: