>> From: "Gavin Sinclair"
> I appreciate your forethought for the FAQ, but I'm not really sure
> what sort of entry to put.  Could you please suggest a question and an
> answer, and we'll discuss it, and if we get something that makes
> sense, it can go in the FAQ.  Keep it on the list: the more comments
> on the proposed entry, the better.

  Now that it turns out that there is common knowledge/agreement ("just use
'rb' wherever there's a chance that the file is binary") I'm not really so
sure that it is FAQ material. The F in FAQ stands for "frequently" after
all, and since I'm the only one who came up with this as "an issue", I'm not
sure that "frequently" is justfied.

 Still, maybe something in the line of the "Ruby On MS Windows" part of the
FAQ:

Q: What are the differences between cygwin and mswin32 Ruby builds that one
should be aware of?

A: popen things don't work on mswin32 builds, etc. etc. etc. When opening an
existing file default behavior is "binary" since the cygwin layer is an
adapter for Unices that don't differentiate between binary/text, etc. etc.
Then maybe a pointer or a short entry on CR/LF issue, and maybe even a note
(from Tobias Peters message nr. 60142) on choices when installing standalone
cygwin vs. PragProg Ruby cygwin bundle and it's preset behavior.

 or maybe:

Q: When doing a read() ( <digression> with a risk of starting a flame war:
having so many aliases in Ruby libraries, me thinks that a read_all() would
be good to have since  it fully describes what happens </digression>) on a
binary file, what is read gets truncated.

A: PragProg cygwin Ruby builds used to behave in-that-way, and mswin32
builds behave in-another-way, so if you're switching from cygwin to mswin32
.... and then the whole story, AND a recommendation to adopt the practice to
use 'b' whenever... etc.

(English is not my native language so I'm sure that somebody would phrase
all this better)

.... if it is FAQ material after all, since I'm not sure that promoting my
own ignorance/bad practice to a FAQ is the best way to get "my own 5 minutes
of glory". ;)

> I personally use the "b" flag whenever appropriate no matter what
> platform I'm on.  Even though it makes no difference on Unix, the "b"
> flag is still a comment to make it more clear what we expect to do
> with the data.

Thank you (and everybody else) for the advice, it appears to be sound
practice, so I will adopt it.


Regards,
M.