A
Anders Bengtsson
Hi,
I've run into a problem when replacing "Marshal.dump" with "YAML.dump".
Some of my classes use custom marshalling, with "_dump" and "_load"
methods. With YAML these methods are not used, which breaks the
application.
YAML uses an object's "to_yaml" method if available. But that method
expects valid YAML code to be returned, unlike "_dump" that can return
just about anything. Also there doesn't seem to be anything
corresponding to "_load".
Any ideas about how I can make things compatible with both Marshal and
YAML at the same time?
/Anders
=====
__________________________________________________
Anders Bengtsson (e-mail address removed)
Stockholm, Sweden
Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html
I've run into a problem when replacing "Marshal.dump" with "YAML.dump".
Some of my classes use custom marshalling, with "_dump" and "_load"
methods. With YAML these methods are not used, which breaks the
application.
YAML uses an object's "to_yaml" method if available. But that method
expects valid YAML code to be returned, unlike "_dump" that can return
just about anything. Also there doesn't seem to be anything
corresponding to "_load".
Any ideas about how I can make things compatible with both Marshal and
YAML at the same time?
/Anders
=====
__________________________________________________
Anders Bengtsson (e-mail address removed)
Stockholm, Sweden
Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html