Introduction
Marshal is the binary serialisation built into Ruby: it turns objects into a byte stream and rebuilds them. The data has no standard file extension; this page is listed as MARSHAL. Loading untrusted Marshal data is unsafe, because it can create almost any loaded class.
Structure
The data starts with two version bytes, a major and a minor version; current Ruby writes 4 and 8.
Not described
This page is a first outline. The details of the layout are not yet described here.
Known, not yet covered
- Reference: the object type codes and integer encoding, which Ruby’s documentation and source describe.
- Viewer: the site has no viewer for this format.
Links
Software
- Ruby – the language whose Marshal module writes and reads the data
Reference
- module Marshal – Ruby documentation