Ruby 2.6.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Exceptionクラス > to_tty?
to_tty? -> bool
$stderr が変更されておらず、$stderr.tty? が真の場合は true を返します。
[SEE_ALSO] Exception#full_message