Epic YAML Failure
I just lost 14 hours of my life to this problem. I thought I perhaps had some deep misunderstanding of the whole system I was trying to build, but alas it was a bug.
I was serializing all my classes to yaml for storing the state to disk.. and I thought that that was a fairly perfect system.
But I was having failures in my program and I finally traced it down to an instance variable getting lost between the save yaml to disk and load it back parts.
I added a single instance variable to my class and also It did not matter if what the name of it was, and everything worked again.
I don't know if anyone cares about ruby 1.8.7 anymore or if the code in 1.9 for yaml has the same problems.
If someone cares enough to respond to me from this bug post I'll do what I can to help.
Needless to say this has made me feel very happy that 99% of the time I store data in databases and not in serialized objects.
Updated by tenderlovemaking (Aaron Patterson) over 9 years ago
We need more information than your Ruby version to track down and fix a bug like this. :-)
Could you possibly provide a code sample? Then tell us what you expect the code sample to do, and describe what the code sample actually does?