From: Joel VanderWerf Date: 2008-12-17T03:55:29+09:00 Subject: Re: marshal_load, marshal_dump Tim Hunter wrote: > Absolutely. I wish I could find some examples of custom > marshal_dump/marshal_load implementations. Searching thru the > 1.8.7/1.9.1 sources didn't turn up anything illuminating. A very simple one: class C attr_accessor :x, :y def marshal_dump [x, y] end def marshal_load(ary) @x, @y = ary end end c = C.new c.x = "foo" c.y = "bar" s = Marshal.dump(c) p Marshal.load(s) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407