From ed2dd17294162f996eec15c4c35d2688ed529629 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 5 Jun 2022 14:21:01 +0900 Subject: Use RBOOL --- error.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index 4c501f1446..3f5c05d681 100644 --- a/error.c +++ b/error.c @@ -1280,12 +1280,7 @@ check_highlight_keyword(VALUE opt, int auto_tty_detect) } if (NIL_P(highlight)) { - if (auto_tty_detect) { - highlight = rb_stderr_tty_p() ? Qtrue : Qfalse; - } - else { - highlight = Qfalse; - } + highlight = RBOOL(auto_tty_detect && rb_stderr_tty_p()); } return highlight; -- cgit v1.2.3