From: Yukihiro Matsumoto Date: 2004-10-05T08:22:07+09:00 Subject: Re: pstore.rb not operating in binmode Hi, In message "Re: pstore.rb not operating in binmode" on Tue, 5 Oct 2004 06:12:07 +0900, Henning Koch writes: |On Windows this causes PStore to corrupt the binary |session data. | |I also posted about the issue to |http://www.rubyonrails.org/show/MarshalDataTooShort | |The people in #rubyonrails asked me to post a note to |ruby-talk about this issue. I have no machine that requires "binmode". Does this patch work for you? matz. --- lib/pstore.rb 1 Jul 2004 09:31:37 -0000 1.21 +++ lib/pstore.rb 4 Oct 2004 23:20:53 -0000 @@ -101,2 +101,3 @@ class PStore file = File.open(@filename, File::RDWR | File::CREAT) + file.binmode file.flock(File::LOCK_EX) @@ -106,2 +107,3 @@ class PStore file = File.open(@filename, File::RDONLY) + file.binmode file.flock(File::LOCK_SH)