End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Exception.to_tty?
Exception.to_tty? → true or false
error.c
View on GitHub ↗
static VALUE
exc_s_to_tty_p(VALUE self)
{
return RBOOL(rb_stderr_tty_p());
}
Returns true if exception messages will be sent to a tty.