[LRUG] Best way to serialise a Ruby object?

Andrew Stewart boss at airbladesoftware.com
Fri Jul 15 02:40:00 PDT 2011


On 15 Jul 2011, at 10:26, James Mead wrote:
> If the problem is to do with a difference between Psych and Syck, perhaps it would help to set the YAML engine to be the same when writing and when reading? i.e. YAML::ENGINE.yamler= 'syck'.

This seems to be the best bet but, as I understand it, it's not thread-safe.  So another library could change the YAML engine after I've set it, without my realising.  My source for this is the final paragraph of this comment:

http://www.ruby-forum.com/topic/207565#936510

Yours,
Andy Stewart

-------
http://airbladesoftware.com


More information about the Chat mailing list