Use RBOOL

This commit is contained in:
Nobuyoshi Nakada 2022-06-05 14:21:01 +09:00
parent 5460675bbc
commit ed2dd17294
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -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;