From: Daniel Berger Date: 2007-03-07T01:25:07+09:00 Subject: Re: New "Ruby for Windows" Installer On Mar 5, 10:56 pm, Lothar Scholz wrote: > And well theres also one bugfix i planed to report to the Ruby core list > for quite some time. In windows -1 and (-2 in MSVC 8) are special FILE > pointers in console applications that don't have a console (ms hack) so > "rb_io_isatty(io)" has a bug and needs to be fixed. > > static VALUE > rb_io_isatty(io) > VALUE io; > { > OpenFile *fptr; > GetOpenFile(io, fptr); > if (fileno(fptr->f) == -1) return Qfalse; /* THIS MUST BE ADDED */ > if (isatty(fileno(fptr->f)) == 0) { > return Qfalse; > } > return Qtrue; > > } I wonder if using GetFileType() and checking for FILE_TYPE_CHAR would be a better long term solution. Regards, Dan