append_features(p1)
public
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.
Show source
/*
* call-seq:
* append_features(mod) => mod
*
* When this module is included in another, Ruby calls
* <code>append_features</code> 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 <code>Module#include</code>.
*/
static VALUE
rb_mod_append_features(module, include)
VALUE module, include;
{
switch (TYPE(include)) {
case T_CLASS:
case T_MODULE:
break;
default:
Check_Type(include, T_CLASS);
break;
}
rb_include_module(include, module);
return module;
}