Marshal

Writes obj to a file recursively.

Some objects may not be writeable to file, such as in instances of File or MatchData, or with objects that define unusual methods. When attempting to write such objects to file, a TypeError will occur.

port specifies an instance of IO (or a subclass). In this case, returns port. When omitted, dump returns the object's dump as a string.

When limit is specified, no objects linked at or deeper than limit can be dumped (100 levels is the default. When limit is negative, no depth checking is performed.

Last updated