Website hosting service by

 Back to Index

prev - up - next - index


The module for reading and writing Ruby object in a binary format. This format is machine independent. It can dump most of Ruby objects, there are several exceptional objects like IOs. Dumping such objects raises TypeError exception.

module functions:


Dumps object recursively. Dumping some kind of instances of the classes like Class, Module, IO, Data, etc. will raises TypeError exception.

portmust be the instance of the IO or its subclass. If port is ommited dump returns the dumped image string.

If the dumping object defines `_dump' method, dump calls that method to dump with the limit argument. It must return the dumped image string. If `_dump' method is provided, the class must provide the reverse method named `_load' as its singleton method, which is called with dumped image string, and should return the retsored object.

The limit argument specified the level of the recursive traverse. the default limit value is 100. In case negative limit value is specified, no limit will checked for dumping.

load(port[, proc])

Creates new object from port, which is either IO or String. If optional second argument proc is specified, the proc will called with every created object as an argument. It can be used, for example, schema evolution.

prev - up - next - index





2002-2004 Website Hosting Service

Buy domain name at only $5.95/yr with comprehensive domain hosting services. Domain registration and domain search service from $5.95 Cheap domain name registration and domain transfer service

Disclaimer: This documentation is provided only for the benefits of our website hosting customers.
For authoritative source of the documentation, please refer to