From 4176e8e88faf6eadfe0702664880241079ca2c88 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 25 Jan 2022 11:08:05 +0900 Subject: [PATCH] error.c: use `MRB_SYM()` in `mrb_sys_fail`. --- src/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.c b/src/error.c index 5fa872c9b..e651e3ad8 100644 --- a/src/error.c +++ b/src/error.c @@ -541,8 +541,8 @@ mrb_sys_fail(mrb_state *mrb, const char *mesg) mrb_int no; no = (mrb_int)errno; - if (mrb_class_defined(mrb, "SystemCallError")) { - sce = mrb_class_get(mrb, "SystemCallError"); + if (mrb_class_defined_id(mrb, MRB_SYM(SystemCallError))) { + sce = mrb_class_get_id(mrb, MRB_SYM(SystemCallError)); if (mesg != NULL) { mrb_funcall(mrb, mrb_obj_value(sce), "_sys_fail", 2, mrb_fixnum_value(no), mrb_str_new_cstr(mrb, mesg)); }