summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-21 18:23:20 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-21 19:29:16 +0900
commit3ef09c6e66cf28455536593af60a7c7072fb1777 (patch)
treed43bf9a56cc34a6af6090fd961acce6f5b8a9007 /eval_error.c
parentbf11bf31e2e795bb22c939a5b5cd412c98208982 (diff)
downloadruby-3ef09c6e66cf28455536593af60a7c7072fb1777.tar.gz
eval_error.c: default nil as "reverse" is now false [Feature #8661]
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval_error.c b/eval_error.c
index 809d8aef00..89e27afe56 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -309,9 +309,9 @@ rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE highlig
errat = Qnil;
}
eclass = CLASS_OF(errinfo);
- if (NIL_P(reverse) || NIL_P(highlight)) {
+ if (NIL_P(reverse)) reverse = Qfalse;
+ if (NIL_P(highlight)) {
VALUE tty = (VALUE)rb_stderr_tty_p();
- if (NIL_P(reverse)) reverse = tty;
if (NIL_P(highlight)) highlight = tty;
}
if (reverse) {