W
Wes Gamble
All,
Attempting to debug the autotest gem on Windows. I've gotten as far as
discovering that in the code below, the open call will succeed (and cmd
has a real command in it), however the file object f, will be at eof
immediately.
I can run this command on the command line in Windows and see that it
has output.
My questions is:
should I expect open("| <whatever>", "r") to run the command and then
get the output in the attached block on Windows?
open("| #{cmd}", "r") do |f|
until f.eof? do
c = f.getc
putc c
line << c
if c == ?\n then
@results << line.pack("c*")
line.clear
end
end
end
Thanks,
Wes
Attempting to debug the autotest gem on Windows. I've gotten as far as
discovering that in the code below, the open call will succeed (and cmd
has a real command in it), however the file object f, will be at eof
immediately.
I can run this command on the command line in Windows and see that it
has output.
My questions is:
should I expect open("| <whatever>", "r") to run the command and then
get the output in the attached block on Windows?
open("| #{cmd}", "r") do |f|
until f.eof? do
c = f.getc
putc c
line << c
if c == ?\n then
@results << line.pack("c*")
line.clear
end
end
end
Thanks,
Wes