Removed Module.allocate [Bug #17048]

This commit is contained in:
Nobuyoshi Nakada 2020-07-26 13:20:19 +09:00
parent 178ee1e801
commit fd918d1afa
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-09-17 19:05:25 +09:00
3 changed files with 2 additions and 26 deletions

View file

@ -4612,6 +4612,7 @@ InitVM_Object(void)
rb_define_method(rb_cModule, "attr_accessor", rb_mod_attr_accessor, -1);
rb_define_alloc_func(rb_cModule, rb_module_s_alloc);
rb_undef_method(rb_singleton_class(rb_cModule), "allocate");
rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0);
rb_define_method(rb_cModule, "initialize_clone", rb_mod_initialize_clone, -1);
rb_define_method(rb_cModule, "instance_methods", rb_class_instance_methods, -1); /* in class.c */
@ -4643,6 +4644,7 @@ InitVM_Object(void)
rb_define_method(rb_cModule, "deprecate_constant", rb_mod_deprecate_constant, -1); /* in variable.c */
rb_define_method(rb_cModule, "singleton_class?", rb_mod_singleton_p, 0);
rb_define_method(rb_singleton_class(rb_cClass), "allocate", rb_class_alloc_m, 0);
rb_define_method(rb_cClass, "allocate", rb_class_alloc_m, 0);
rb_define_method(rb_cClass, "new", rb_class_new_instance_pass_kw, -1);
rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);