diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-26 13:20:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-17 11:14:08 +0900 |
commit | fd918d1afa89405c194e90476373f936b3577df0 (patch) | |
tree | 07838c9b7ac04483ed314541f0581c8b8f68a5b3 /object.c | |
parent | 178ee1e801acb33d13b3e8a630f6ca4926c68fbc (diff) |
Removed Module.allocate [Bug #17048]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4858
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |