From: Vahagn Hayrapetyan Date: 2009-09-05T21:35:00+09:00 Subject: Re: End of file error when trying to Marshal.load @Robert: Ah! "While not closing a read only file usually does not have dramatic consequences, not closing a file opened for writing likely has dramatic consequences." The working method: def marshalKlass o = Klass.new("hello\n") print o.sayHello dumped = File.open("output.txt", "w") Marshal.dump(o, dumped) dumped.close data = File.open("output.txt", "r") obj = Marshal.load(data) data.close print obj.sayHello end Thanks, / Vahagn -- Posted via http://www.ruby-forum.com/.