Tempfile should be binary by default, or at least a flag

This and IO.readlines both. :slight_smile:

Regards,

Dan

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

路路路

-----Original Message-----
From: list-bounce@example.com
[mailto:list-bounce@example.com] On Behalf Of Ben Harper
Sent: Tuesday, August 22, 2006 3:05 AM
To: ruby-talk ML
Subject: tempfile should be binary by default, or at least a flag

Shouldn't tempfile open it's file in binary mode by default?

One can of course call .binmode immediately after creating
the tempfile, but doesn't binary by default make more sense
in the case of a temporary
file?

If it's too late to change the default behaviour, then perhaps
tempfile.new should accept a flag parameter?