On Fri, Feb 11, 2011 at 11:27 PM, Erik Hollensbe <e...@hollensbe.org> wrote:
>
> I can look into this tomorrow morning if you want, I'm responsible for those 
> patches.
>

Not a problem, 1.8.7 and 1.9.2 suffer from this, 1.9.3dev is already fixed:

ruby -v -e "puts STDIN.tty?" < NUL

ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
true

ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
true

ruby 1.9.3dev (2011-02-02 trunk 30760) [i386-mingw32]
false

The only workaround I can think of is compare additionally is instead
of doing tty? on the stream, do something like this?

return nil if not isarealtty?(@ins)

where you evaluate if @ins.fileno is not 3 (0 = STDIN, 1 = STDOUT, 2 =
STDERR, 3 = NUL:)

That is the only thing I can think of right now, but dunno what cygwin
is going to say about it (and is friday night, brain is really burnt
by now)

Will think on another approach during the weekend.

Cheers,
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to