#include "ruby/ruby.h"#include "ruby/st.h"#include "method.h"#include "vm_core.h"#include <ctype.h>#include <stdarg.h>

Go to the source code of this file.
Data Structures | |
| struct | clone_method_data |
Defines | |
| #define | METACLASS_OF(k) RBASIC(k)->klass |
| #define | META_CLASS_OF_CLASS_CLASS_P(k) (METACLASS_OF(k) == k) |
| whether k is a meta^(n)-class of Class class | |
| #define | ENSURE_EIGENCLASS(klass) (rb_ivar_get(METACLASS_OF(klass), id_attached) == klass ? METACLASS_OF(klass) : make_metaclass(klass)) |
| ensures klass belongs to its own eigenclass. | |
| #define | VISI(x) ((x)&NOEX_MASK) |
| #define | VISI_CHECK(x, f) (VISI(x) == (f)) |
| #define | SPECIAL_SINGLETON(x, c) |
Functions | |
| static VALUE | class_alloc (VALUE flags, VALUE klass) |
| Allocates a struct RClass for a new class. | |
| VALUE | rb_class_boot (VALUE super) |
| A utility function that wraps class_alloc. | |
| void | rb_check_inheritable (VALUE super) |
| Ensures a class can be derived from super. | |
| VALUE | rb_class_new (VALUE super) |
| Creates a new class. | |
| VALUE | rb_iseq_clone (VALUE iseqval, VALUE newcbase) |
| static int | clone_method (ID mid, const rb_method_entry_t *me, struct clone_method_data *data) |
| VALUE | rb_mod_init_copy (VALUE clone, VALUE orig) |
| VALUE | rb_class_init_copy (VALUE clone, VALUE orig) |
| VALUE | rb_singleton_class_clone (VALUE obj) |
| void | rb_singleton_class_attached (VALUE klass, VALUE obj) |
| Attach a object to a singleton class. | |
| static VALUE | make_metaclass (VALUE klass) |
| Creates a metaclass of klass. | |
| static VALUE | make_singleton_class (VALUE obj) |
| Creates a singleton class for obj. | |
| static VALUE | boot_defclass (const char *name, VALUE super) |
| void | Init_class_hierarchy (void) |
| VALUE | rb_make_metaclass (VALUE obj, VALUE unused) |
| VALUE | rb_define_class_id (ID id, VALUE super) |
| Defines a new class. | |
| VALUE | rb_class_inherited (VALUE super, VALUE klass) |
| Calls Class::inherited. | |
| VALUE | rb_define_class (const char *name, VALUE super) |
| Defines a top-level class. | |
| VALUE | rb_define_class_under (VALUE outer, const char *name, VALUE super) |
| Defines a class under the namespace of outer. | |
| VALUE | rb_define_class_id_under (VALUE outer, ID id, VALUE super) |
| Defines a class under the namespace of outer. | |
| VALUE | rb_module_new (void) |
| VALUE | rb_define_module_id (ID id) |
| VALUE | rb_define_module (const char *name) |
| VALUE | rb_define_module_under (VALUE outer, const char *name) |
| VALUE | rb_define_module_id_under (VALUE outer, ID id) |
| static VALUE | include_class_new (VALUE module, VALUE super) |
| void | rb_include_module (VALUE klass, VALUE module) |
| VALUE | rb_mod_included_modules (VALUE mod) |
| VALUE | rb_mod_include_p (VALUE mod, VALUE mod2) |
| VALUE | rb_mod_ancestors (VALUE mod) |
| static int | ins_methods_push (ID name, long type, VALUE ary, long visi) |
| static int | ins_methods_i (ID name, long type, VALUE ary) |
| static int | ins_methods_prot_i (ID name, long type, VALUE ary) |
| static int | ins_methods_priv_i (ID name, long type, VALUE ary) |
| static int | ins_methods_pub_i (ID name, long type, VALUE ary) |
| static int | method_entry (ID key, const rb_method_entry_t *me, st_table *list) |
| static VALUE | class_instance_method_list (int argc, VALUE *argv, VALUE mod, int obj, int(*func)(ID, long, VALUE)) |
| VALUE | rb_class_instance_methods (int argc, VALUE *argv, VALUE mod) |
| VALUE | rb_class_protected_instance_methods (int argc, VALUE *argv, VALUE mod) |
| VALUE | rb_class_private_instance_methods (int argc, VALUE *argv, VALUE mod) |
| VALUE | rb_class_public_instance_methods (int argc, VALUE *argv, VALUE mod) |
| VALUE | rb_obj_methods (int argc, VALUE *argv, VALUE obj) |
| VALUE | rb_obj_protected_methods (int argc, VALUE *argv, VALUE obj) |
| VALUE | rb_obj_private_methods (int argc, VALUE *argv, VALUE obj) |
| VALUE | rb_obj_public_methods (int argc, VALUE *argv, VALUE obj) |
| VALUE | rb_obj_singleton_methods (int argc, VALUE *argv, VALUE obj) |
| void | rb_define_method_id (VALUE klass, ID mid, VALUE(*func)(ANYARGS), int argc) |
| void | rb_define_method (VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc) |
| void | rb_define_protected_method (VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc) |
| void | rb_define_private_method (VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc) |
| void | rb_undef_method (VALUE klass, const char *name) |
| static VALUE | singleton_class_of (VALUE obj) |
| VALUE | rb_singleton_class (VALUE obj) |
| Returns the singleton class of obj. | |
| void | rb_define_singleton_method (VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc) |
| Defines a singleton method for obj. | |
| void | rb_define_module_function (VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc) |
| Defines a module function for module. | |
| void | rb_define_global_function (const char *name, VALUE(*func)(ANYARGS), int argc) |
| Defines a global function. | |
| void | rb_define_alias (VALUE klass, const char *name1, const char *name2) |
| Defines an alias of a method. | |
| void | rb_define_attr (VALUE klass, const char *name, int read, int write) |
| Defines (a) public accessor method(s) for an attribute. | |
| int | rb_obj_basic_to_s_p (VALUE obj) |
| int | rb_scan_args (int argc, const VALUE *argv, const char *fmt,...) |
Variables | |
| st_table * | rb_class_tbl |
| static ID | id_attached |