fails:IO#tty? return false when called on a standard stream redirected to a file or a pipe