diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-05-21 22:58:45 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-05-21 22:58:45 +0900 |
commit | 7e52533104f1b67c06c817384416fe011a25eaaf (patch) | |
tree | 11291f10283c333e1167cc4fb9c81d818848363f /error.c | |
parent | 6ba394ce30e88a502ea90dc23b6626f89441ac4b (diff) |
No fallback to default values
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1269,13 +1269,12 @@ check_highlight_keyword(VALUE opt, int auto_tty_detect) VALUE highlight = Qnil; if (!NIL_P(opt)) { - highlight = rb_hash_aref(opt, sym_highlight); + highlight = rb_hash_lookup(opt, sym_highlight); switch (highlight) { default: rb_bool_expected(highlight, "highlight"); UNREACHABLE; - case Qundef: highlight = Qnil; break; case Qtrue: case Qfalse: case Qnil: break; } } @@ -1301,7 +1300,7 @@ check_order_keyword(VALUE opt) static VALUE kw_order; if (!kw_order) kw_order = ID2SYM(rb_intern_const("order")); - order = rb_hash_aref(opt, kw_order); + order = rb_hash_lookup(opt, kw_order); if (order != Qnil) { ID id = rb_check_id(&order); |