it "raises EOFError on loading an empty file" do temp_file = "marshal.rubinius.tmp.#{Process.pid}" File.new(temp_file, "w").close begin file = File.new(temp_file, "r") lambda { puts "foo" }.should raise_error(EOFError) ensure file.close rescue nil File.unlink(temp_file) rescue nil end end