From: Tim Hunter Date: 2009-09-05T20:34:44+09:00 Subject: Re: End of file error when trying to Marshal.load Vahagn Hayrapetyan wrote: > The line: > obj = Marshal.load(data) > gives the following error: > > Klass.rb:19:in `load': end of file reached (EOFError) > from Klass.rb:19:in `marshalKlass' > from Klass.rb:32 > > The line: > data = File.open("output.txt") places the cursor at the start of the > file. What's wrong? I'm guessing you're on Windows. You need to open the file in binary mode. That is, with "wb" and "rb". -- MagickWand for Ruby - http://magickwand.rubyforge.org/