Skip to content

Commit c618b44

Browse files
committed
class.c (include_module_at): narrow local variable scope
1 parent 48f93ad commit c618b44

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/class.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,6 @@ include_class_new(mrb_state *mrb, struct RClass *m, struct RClass *super)
14641464
static int
14651465
include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, struct RClass *m, int search_super)
14661466
{
1467-
struct RClass *ic;
14681467
void *klass_mt = find_origin(c)->mt;
14691468

14701469
while (m) {
@@ -1495,7 +1494,7 @@ include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, stru
14951494
p = p->super;
14961495
}
14971496

1498-
ic = include_class_new(mrb, m, ins_pos->super);
1497+
struct RClass *ic = include_class_new(mrb, m, ins_pos->super);
14991498
m->flags |= MRB_FL_CLASS_IS_INHERITED;
15001499
ins_pos->super = ic;
15011500
mrb_field_write_barrier(mrb, (struct RBasic*)ins_pos, (struct RBasic*)ic);

0 commit comments

Comments
 (0)