Retrieve the StandardError class from mrb_state

This commit is contained in:
dearblue
2022-09-17 22:03:52 +09:00
parent a9d0e9a412
commit 50ea98e76d
+1 -1
View File
@@ -309,7 +309,7 @@ mrb_mruby_errno_gem_init(mrb_state *mrb)
{
struct RClass *e, *eno, *sce, *ste;
ste = mrb_class_get_id(mrb, MRB_SYM(StandardError));
ste = mrb->eStandardError_class;
sce = mrb_define_class(mrb, "SystemCallError", ste);
mrb_define_class_method(mrb, sce, "_sys_fail", mrb_sce_sys_fail, MRB_ARGS_REQ(1));