mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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]
This commit is contained in:
parent
7185c00fcc
commit
6606597109
8 changed files with 185 additions and 4 deletions
|
@ -100,6 +100,14 @@ VALUE rb_define_class_id_under(VALUE outer, ID id, VALUE super);
|
|||
*/
|
||||
VALUE rb_module_new(void);
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new, anonymous refinement.
|
||||
*
|
||||
* @return An anonymous refinement.
|
||||
*/
|
||||
VALUE rb_refinement_new(void);
|
||||
|
||||
/**
|
||||
* This is a very badly designed API that creates an anonymous module.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue