What do people think about adding a method to class IO that returns an IO
object for the platform dependend null device (NUL on win, /dev/null or
/dev/zero on unix)? Alternatively there could be a constant with the
platform dependent name of this device, if it can always be opened like a
file on all supported platforms.
/dev/null is great when the program doesn’t have it’s own way to discard
data, but in this case, it might be easier and more cross-platform to
simply have an IO object who’s read and write do nothing.
···
On Thu, 2003-05-08 at 10:52, Robert Klemme wrote:
What do people think about adding a method to class IO that returns an IO
object for the platform dependend null device (NUL on win, /dev/null or
/dev/zero on unix)? Alternatively there could be a constant with the
platform dependent name of this device, if it can always be opened like a
file on all supported platforms.
AFAIK Windows has /dev/null but things may be different with the
obsolete 9x series.
Gis,
Josef ‘Jupp’ Schugt
···
–
e-mails that do not contain plain text, are larger than 50 KiB, are
unsolicited, or contain binarys are ignored unless payment from your
side or technical reasons give rise to a non-standard treatment.
What do people think about adding a method to class IO that returns an
IO
object for the platform dependend null device (NUL on win, /dev/null
or
/dev/zero on unix)? Alternatively there could be a constant with the
platform dependent name of this device, if it can always be opened
like a
file on all supported platforms.
/dev/null is great when the program doesn’t have it’s own way to discard
data, but in this case, it might be easier and more cross-platform to
simply have an IO object who’s read and write do nothing.
This does not work with child processes that are no ruby processes.