diff options
author | Shugo Maeda <shugo@ruby-lang.org> | 2021-10-21 16:21:08 +0900 |
---|---|---|
committer | Shugo Maeda <shugo@ruby-lang.org> | 2021-10-21 16:31:54 +0900 |
commit | 6606597109bdb535a150606323ce3d8f5750e1f6 (patch) | |
tree | 153eac378825ad9b17be9e8ae10d80572641f2c5 /object.c | |
parent | 7185c00fcc330db8951b684f548ba3d10983bb92 (diff) |
Deprecate include/prepend in refinements and add Refinement#import_methods instead
Refinement#import_methods imports methods from modules.
Unlike Module#include, it copies methods and adds them into the refinement,
so the refinement is activated in the imported methods.
[Bug #17429] [ruby-core:101639]
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -50,6 +50,7 @@ VALUE rb_mKernel; VALUE rb_cObject; VALUE rb_cModule; VALUE rb_cClass; +VALUE rb_cRefinement; VALUE rb_cNilClass; VALUE rb_cTrueClass; @@ -4357,6 +4358,7 @@ InitVM_Object(void) rb_cObject = rb_define_class("Object", rb_cBasicObject); rb_cModule = rb_define_class("Module", rb_cObject); rb_cClass = rb_define_class("Class", rb_cModule); + rb_cRefinement = rb_define_class("Refinement", rb_cModule); #endif rb_define_private_method(rb_cBasicObject, "initialize", rb_obj_initialize, 0); |