From: Anders Bengtsson Date: 2004-03-31T16:52:04+09:00 Subject: Re: Problem with binary files in mswin ruby --- Yukihiro Matsumoto wrote: > In message "Re: Problem with binary files in mswin ruby" > on 04/03/31, Anders Bengtsson writes: > > |Could the methods in Marshal check for this and raise an exception > if > |they fail to turn on binary mode? (At least on platforms where it > |matters). > > I'm not sure what you want exactly. Making "binmode" to raise > exception when internal buffer is already filled with text-mode > contents? Something like that, yes. Currently you can get silent errors when Marshal fails to set the stream to binary. Without knowing about this internal feature in Marshal, it is very hard to find these errors. In the case of our Madeleine library, it worked in three our of four cases, making the single broken case quite confusing. Alternatively the code in Marshal that sets the stream to binary could be removed entirely, which would also make it more "fail-fast". /Anders ===== __________________________________________________ Anders Bengtsson ndrsbngtssn@yahoo.se Stockholm, Sweden H�strusk och gr� moln - k�p en resa till solen p� Yahoo! Resor p� adressen http://se.docs.yahoo.com/travel/index.html