I can never remember the order of the parameters to Marshal, so here’s an example of using it:
#serialization
File.open("some.file","wb") do |file|
Marshal.dump(object_to_serialize,file)
end
#loading
object = nil
File.open("some.file","rb") {|f| object = Marshal.load(f)}