From: Gregory Brown Date: 2006-08-02T10:48:11+09:00 Subject: Re: Can you explain what this repo (yaml/Marshal) code do? On 8/1/06, anne001 wrote: > repositiory is a hash keyed on some kind of check sum derived from the > file. > But what is the use of Marshal? something to do with memory management, Marshal is a way to save the state of your Ruby objects to a file. Unlike YAML, it outputs in binary format. It is written in C, so it can serialize and restore objects very quickly. It looks like in this code, this is simply how the save and load functions are implemented, and since 'self' is being passed, it will just serialize the Repository object to file during save and restore it during load. If you need readable, but much slower serialization, you could use YAML in place of the Marshal calls.