Marshal

A module providing the capability to write a Ruby object to and read it from a file (or string array).

Module Functions

Marshal.dump(obj[, port][, limit])

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.

Marshal.load(port)

Reads marshal data from port (i.e., the string output from Marshal.dump) and creates an object with the same state as the original object. port specifies an instance of IO (or a subclass).

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)