From: Shugo Maeda Date: 1999-07-15T09:40:32+09:00 Subject: [ruby-talk:00497] Re: serialization of objects? Hi, At Wed, 14 Jul 1999 14:12:03 -0600 (MDT), Michael Hohn wrote: > I've noticed the Object.to_s method to get a string from an Object. > Is there a simple way to restore an entire object hierarchy from a > string? For example, given a (non-cyclic) graph structure f, You can use Marshal module. > print file, "%s", f.to_s Marshal::dump(f, file) > f.from_string_stream file f = Marshal::load(f) For more information, see: http://hoyogw.netlab.co.jp/ruby/man-1.3/Marshal.html Shugo