Method: Module#append_features
- Defined in:
- eval.c
#append_features(mod) ⇒ Object (private)
When this module is included in another, Ruby calls #append_features in this module, passing it the receiving module in mod. Ruby’s default implementation is to add the constants, methods, and module variables of this module to mod if this module has not already been added to mod or one of its ancestors. See also Module#include.
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 |
# File 'eval.c', line 1296
static VALUE
rb_mod_append_features(VALUE module, VALUE include)
{
if (!CLASS_OR_MODULE_P(include)) {
Check_Type(include, T_CLASS);
}
rb_include_module(include, module);
return module;
}
|