title: How can I save an object to a file?
body: <p>I would like to save an object to a file, and then read it from the file easily. As a simple example, lets say I have the following 3d array:</p>
  
  <pre><code>m = [[[0, 0, 0],
   [0, 0, 0],
   [0, 0, 0]],
  [[0, 0, 0],
   [0, 0, 0],
   [0, 0, 0]]]
  </code></pre>
  
  <p>Is there an easy Ruby API that I can use to achieve this without programming a parser to interpret the data from the file? In the example I give it is easy, but as the objects become more complicated, it gets annoying to make objects persistent.</p>