I’m working over somebody else’s Ruby code, and one of the methods used
during testing redirects all output to /dev/null. This is not a problem on
any flavor of UNIX or Linux that I’m familiar with, but on Windows XP it
raises a “ErrNo::ENOENT: No such file or directory” error. Is there an
equivalent file or means of temporarily disabling $stderr/$stdout/$defout?
At Mon, 18 Nov 2002 09:45:48 +0900, Brian Wisti wrote:
I’m working over somebody else’s Ruby code, and one of the methods
used during testing redirects all output to /dev/null. This is not a
problem on any flavor of UNIX or Linux that I’m familiar with, but on
Windows XP it raises a “ErrNo::ENOENT: No such file or directory”
error. Is there an equivalent file or means of temporarily disabling
$stderr/$stdout/$defout?
I’m working over somebody else’s Ruby code, and one of the methods
used during testing redirects all output to /dev/null. This is not a
problem on any flavor of UNIX or Linux that I’m familiar with, but on
Windows XP it raises a “ErrNo::ENOENT: No such file or directory”
error. Is there an equivalent file or means of temporarily disabling
$stderr/$stdout/$defout?
nul
I feel so silly asking, but do you mean along the lines of this?
File.open("nul", "w")
No, wait. That’d just make a file called “nul”, wouldn’t it? What am I
missing here? Is there a good online resource for me to study stuff like
this? Cross-platform programming is much easier when you know the platform
you’re crossing to.
Original:
I feel so silly asking, but do you mean along the lines of this?
File.open("nul", "w")
No, wait. That’d just make a file called “nul”, wouldn’t it? What am I missing
here? Is there a good online resource for me to study stuff like this?
Cross-platform programming is much easier when you know the platform you’re
crossing to.