small cosmetic changes

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-05-27 16:41:43 +09:00
parent 0ffe9b987a
commit a02894afa3
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -1601,7 +1601,7 @@ mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, vo
gc_each_objects(mrb, &mrb->gc, callback, data);
mrb->jmp = prev_jmp;
mrb->gc.iterating = iterating;
} MRB_CATCH(&c_jmp) {
} MRB_CATCH(&c_jmp) {
mrb->gc.iterating = iterating;
mrb->jmp = prev_jmp;
MRB_THROW(prev_jmp);
+2 -3
View File
@@ -774,9 +774,8 @@ const_get(mrb_state *mrb, struct RClass *base, mrb_sym sym, mrb_bool skip)
if (skip) c = c->super;
L_RETRY:
while (c) {
if (!MRB_FLAG_TEST(c, MRB_FL_CLASS_IS_PREPENDED) && c->iv) {
if (iv_get(mrb, c->iv, sym, &v))
return v;
if (!MRB_FLAG_TEST(c, MRB_FL_CLASS_IS_PREPENDED) && c->iv && iv_get(mrb, c->iv, sym, &v)) {
return v;
}
c = c->super;
if (!skip && c == mrb->object_class) break;