1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rb_vm_add_root_module(): Remove unused parameter

This commit is contained in:
Alan Wu 2020-11-09 10:27:31 -05:00
parent cbe869b370
commit 6817f4c6b1
Notes: git 2020-11-10 06:09:05 +09:00
3 changed files with 9 additions and 9 deletions

14
class.c
View file

@ -626,7 +626,7 @@ boot_defclass(const char *name, VALUE super)
ID id = rb_intern(name); ID id = rb_intern(name);
rb_const_set((rb_cObject ? rb_cObject : obj), id, obj); rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
rb_vm_add_root_module(id, obj); rb_vm_add_root_module(obj);
return obj; return obj;
} }
@ -748,14 +748,14 @@ rb_define_class(const char *name, VALUE super)
} }
/* Class may have been defined in Ruby and not pin-rooted */ /* Class may have been defined in Ruby and not pin-rooted */
rb_vm_add_root_module(id, klass); rb_vm_add_root_module(klass);
return klass; return klass;
} }
if (!super) { if (!super) {
rb_raise(rb_eArgError, "no super class for `%s'", name); rb_raise(rb_eArgError, "no super class for `%s'", name);
} }
klass = rb_define_class_id(id, super); klass = rb_define_class_id(id, super);
rb_vm_add_root_module(id, klass); rb_vm_add_root_module(klass);
rb_const_set(rb_cObject, id, klass); rb_const_set(rb_cObject, id, klass);
rb_class_inherited(super, klass); rb_class_inherited(super, klass);
@ -821,7 +821,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
outer, rb_id2str(id), RCLASS_SUPER(klass), super); outer, rb_id2str(id), RCLASS_SUPER(klass), super);
} }
/* Class may have been defined in Ruby and not pin-rooted */ /* Class may have been defined in Ruby and not pin-rooted */
rb_vm_add_root_module(id, klass); rb_vm_add_root_module(klass);
return klass; return klass;
} }
@ -833,7 +833,7 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super)
rb_set_class_path_string(klass, outer, rb_id2str(id)); rb_set_class_path_string(klass, outer, rb_id2str(id));
rb_const_set(outer, id, klass); rb_const_set(outer, id, klass);
rb_class_inherited(super, klass); rb_class_inherited(super, klass);
rb_vm_add_root_module(id, klass); rb_vm_add_root_module(klass);
rb_gc_register_mark_object(klass); rb_gc_register_mark_object(klass);
return klass; return klass;
@ -867,11 +867,11 @@ rb_define_module(const char *name)
name, rb_obj_class(module)); name, rb_obj_class(module));
} }
/* Module may have been defined in Ruby and not pin-rooted */ /* Module may have been defined in Ruby and not pin-rooted */
rb_vm_add_root_module(id, module); rb_vm_add_root_module(module);
return module; return module;
} }
module = rb_define_module_id(id); module = rb_define_module_id(id);
rb_vm_add_root_module(id, module); rb_vm_add_root_module(module);
rb_gc_register_mark_object(module); rb_gc_register_mark_object(module);
rb_const_set(rb_cObject, id, module); rb_const_set(rb_cObject, id, module);

View file

@ -54,7 +54,7 @@ const void **rb_vm_get_insns_address_table(void);
VALUE rb_source_location(int *pline); VALUE rb_source_location(int *pline);
const char *rb_source_location_cstr(int *pline); const char *rb_source_location_cstr(int *pline);
MJIT_STATIC void rb_vm_pop_cfunc_frame(void); MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
int rb_vm_add_root_module(ID id, VALUE module); int rb_vm_add_root_module(VALUE module);
void rb_vm_check_redefinition_by_prepend(VALUE klass); void rb_vm_check_redefinition_by_prepend(VALUE klass);
int rb_vm_check_optimizable_mid(VALUE mid); int rb_vm_check_optimizable_mid(VALUE mid);
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements); VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);

2
vm.c
View file

@ -2597,7 +2597,7 @@ rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE cls,
} }
int int
rb_vm_add_root_module(ID id, VALUE module) rb_vm_add_root_module(VALUE module)
{ {
rb_vm_t *vm = GET_VM(); rb_vm_t *vm = GET_VM();