39 #define id_match idEqTilde 40 #define id_inspect idInspect 41 #define id_init_copy idInitialize_copy 42 #define id_init_clone idInitialize_clone 43 #define id_init_dup idInitialize_dup 44 #define id_const_missing idConst_missing 46 #define CLASS_OR_MODULE_P(obj) \ 47 (!SPECIAL_CONST_P(obj) && \ 48 (BUILTIN_TYPE(obj) == T_CLASS || BUILTIN_TYPE(obj) == T_MODULE)) 90 if (obj1 == obj2)
return Qtrue;
141 if (obj1 == obj2)
return Qtrue;
166 #if SIZEOF_LONG == SIZEOF_VOIDP 168 #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP 171 # error not supported 262 ROBJECT(dest)->as.heap.ivptr = 0;
263 ROBJECT(dest)->as.heap.numiv = 0;
264 ROBJECT(dest)->as.heap.iv_index_tbl = 0;
266 if (
RBASIC(obj)->flags & ROBJECT_EMBED) {
277 ROBJECT(dest)->as.heap.ivptr = ptr;
279 ROBJECT(dest)->as.heap.iv_index_tbl =
ROBJECT(obj)->as.heap.iv_index_tbl;
280 RBASIC(dest)->flags &= ~ROBJECT_EMBED;
342 static ID keyword_ids[1];
349 if (!keyword_ids[0]) {
355 kwfreeze = kwargs[0];
472 if (obj == orig)
return obj;
1047 rb_warning(
"untrusted? is deprecated and its behavior is same as tainted?");
1061 rb_warning(
"untrust is deprecated and its behavior is same as taint");
1076 rb_warning(
"trust is deprecated and its behavior is same as untaint");
1116 rb_bug(
"special consts should be frozen.");
1471 if (obj1 == obj2 ||
rb_equal(obj1, obj2))
1517 VALUE refined_class, defined_at;
1534 if (!
NIL_P(refined_class)) {
1539 CONST_ID(id_defined_at,
"__defined_at__");
1595 if (mod == arg)
return Qtrue;
1623 if (mod == arg)
return Qfalse;
1664 if (mod == arg)
return Qfalse;
1685 if (mod == arg)
return INT2FIX(0);
1863 obj = (*allocator)(klass);
1941 return RCLASS(klass)->super;
1944 #define id_for_var(obj, name, part, type) \ 1945 id_for_setter(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name") 1946 #define id_for_setter(obj, name, type, message) \ 1947 check_setter_id(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message)) 1950 int (*valid_id_p)(
ID),
int (*valid_name_p)(
VALUE),
1951 const char *message,
size_t message_len)
1956 if (
id ? !valid_id_p(
id) : !valid_name_p(name)) {
2004 for (i=0; i<
argc; i++) {
2013 if (argc == 2 && (argv[1] ==
Qtrue || argv[1] ==
Qfalse)) {
2014 rb_warning(
"optional boolean argument is obsoleted");
2036 for (i=0; i<
argc; i++) {
2064 for (i=0; i<
argc; i++) {
2115 const char *pbeg, *p, *path, *pend;
2120 recur = (argc == 1) ?
Qtrue : argv[1];
2139 if (p >= pend || !*p) {
2144 if (p + 2 < pend && p[0] ==
':' && p[1] ==
':') {
2154 while (p < pend && *p !=
':') p++;
2156 if (pbeg == p)
goto wrong_name;
2161 if (p < pend && p[0] ==
':') {
2162 if (p + 2 >= pend || p[1] !=
':')
goto wrong_name;
2273 const char *pbeg, *p, *path, *pend;
2278 recur = (argc == 1) ?
Qtrue : argv[1];
2297 if (p >= pend || !*p) {
2302 if (p + 2 < pend && p[0] ==
':' && p[1] ==
':') {
2312 while (p < pend && *p !=
':') p++;
2314 if (pbeg == p)
goto wrong_name;
2319 if (p < pend && p[0] ==
':') {
2320 if (p + 2 >= pend || p[1] !=
':')
goto wrong_name;
2565 #define M(n) {#n, (unsigned short)idTo_##n} 2578 #define IMPLICIT_CONVERSIONS 7 2586 static const char prefix[] =
"to_";
2588 if (strncmp(prefix, method,
sizeof(prefix)-1) == 0) {
2589 const char *
const meth = &method[
sizeof(prefix)-1];
2603 "no implicit conversion of" :
"can't convert";
2604 const char *cname =
NIL_P(val) ?
"nil" :
2605 val ==
Qtrue ?
"true" :
2606 val ==
Qfalse ?
"false" :
2634 if (
TYPE(val) == type)
return val;
2636 if (
TYPE(v) != type) {
2651 if (
TYPE(v) != type) {
2705 if (base != 0)
goto arg_error;
2711 if (base != 0)
goto arg_error;
2717 else if (
NIL_P(val)) {
2718 if (base != 0)
goto arg_error;
2790 const char *ellipsis =
"";
2792 enum {max_width = 20};
2793 #define OutOfRange() ((end - p > max_width) ? \ 2794 (w = max_width, ellipsis = "...") : \ 2795 (w = (int)(end - p), ellipsis = "")) 2801 if (!badcheck && p[0] ==
'0' && (p[1] ==
'x' || p[1] ==
'X')) {
2806 if (
errno == ERANGE) {
2808 rb_warning(
"Float %.*s%s out of range", w, p, ellipsis);
2821 char *e = buf +
sizeof(
buf) - 1;
2824 while (p < end && n < e) prev = *n++ = *p++;
2834 while (*++p ==
'_');
2839 if (n < e) *n++ = prev;
2844 if (!badcheck && p[0] ==
'0' && (p[1] ==
'x' || p[1] ==
'X')) {
2849 if (
errno == ERANGE) {
2851 rb_warning(
"Float %.*s%s out of range", w, p, ellipsis);
2855 if (!end || p == end)
goto bad;
2856 while (*end &&
ISSPACE(*end)) end++;
2860 if (
errno == ERANGE) {
2880 if (badcheck && memchr(s,
'\0', len)) {
2884 char *p =
ALLOCV(v, len);
2896 #define fix2dbl_without_to_f(x) (double)FIX2LONG(x) 2897 #define big2dbl_without_to_f(x) rb_big2dbl(x) 2898 #define int2dbl_without_to_f(x) \ 2899 (FIXNUM_P(x) ? fix2dbl_without_to_f(x) : big2dbl_without_to_f(x)) 2900 #define rat2dbl_without_to_f(x) \ 2901 (int2dbl_without_to_f(rb_rational_num(x)) / \ 2902 int2dbl_without_to_f(rb_rational_den(x))) 2904 #define special_const_to_float(val, pre, post) \ 2907 rb_raise(rb_eTypeError, pre "nil" post); \ 2909 rb_raise(rb_eTypeError, pre "true" post); \ 2911 rb_raise(rb_eTypeError, pre "false" post); \ 3202 if (klass != cache->
klass) {
3203 cache->
klass = klass;
3206 return cache->
basic;
3224 if (
NIL_P(obj))
return notfound;
3420 #define rb_intern(str) rb_intern_const(str) void rb_define_global_const(const char *, VALUE)
#define RBASIC_CLEAR_CLASS(obj)
VALUE rb_check_to_float(VALUE val)
const char * rb_builtin_class_name(VALUE x)
VALUE rb_cvar_get(VALUE, ID)
VALUE rb_mod_module_exec(int, const VALUE *, VALUE)
static int cmp(VALUE x, VALUE y)
ID rb_check_id(volatile VALUE *)
Returns ID for the given name if it is interned already, or 0.
static VALUE rb_obj_ivar_defined(VALUE obj, VALUE iv)
static VALUE nil_to_h(VALUE obj)
int rb_is_instance_id(ID id)
static VALUE rb_mod_attr_accessor(int argc, VALUE *argv, VALUE klass)
static void conversion_mismatch(VALUE val, const char *tname, const char *method, VALUE result)
static VALUE rb_mod_cmp(VALUE mod, VALUE arg)
static ID id_for_attr(VALUE obj, VALUE name)
VALUE rb_class_public_instance_methods(int argc, const VALUE *argv, VALUE mod)
VALUE rb_mod_include_p(VALUE mod, VALUE mod2)
#define fix2dbl_without_to_f(x)
void rb_bug(const char *fmt,...)
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
void rb_check_inheritable(VALUE super)
Ensures a class can be derived from super.
VALUE rb_obj_id(VALUE obj)
VALUE rb_mod_const_missing(VALUE klass, VALUE name)
VALUE rb_inspect(VALUE obj)
static VALUE rb_convert_to_integer(VALUE val, int base)
static unsigned int hash(str, len) register const char *str
void rb_undef_alloc_func(VALUE)
VALUE rb_str_escape(VALUE str)
double rb_cstr_to_dbl(const char *p, int badcheck)
double rb_str_to_dbl(VALUE str, int badcheck)
VALUE rb_f_sprintf(int, const VALUE *)
void rb_obj_copy_ivar(VALUE dest, VALUE obj)
#define rb_usascii_str_new2
#define rb_name_err_raise_str(mesg, recv, name)
int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values)
VALUE rb_class_protected_instance_methods(int argc, const VALUE *argv, VALUE mod)
double rb_num_to_dbl(VALUE val)
static VALUE rb_mod_ge(VALUE mod, VALUE arg)
static VALUE rb_mod_cvar_set(VALUE obj, VALUE iv, VALUE val)
VALUE rb_equal(VALUE obj1, VALUE obj2)
VALUE rb_mod_ancestors(VALUE mod)
VALUE rb_refinement_module_get_refined_class(VALUE module)
ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc)
int rb_is_const_id(ID id)
static VALUE rb_mod_lt(VALUE mod, VALUE arg)
void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj)
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_obj_tap(VALUE obj)
static const struct conv_method_tbl conv_method_names[]
static VALUE rb_mod_attr_reader(int argc, VALUE *argv, VALUE klass)
rb_encoding * rb_default_internal_encoding(void)
#define id_for_setter(obj, name, type, message)
VALUE rb_obj_taint(VALUE obj)
void rb_cvar_set(VALUE, ID, VALUE)
VALUE rb_str_concat(VALUE, VALUE)
static void init_copy(VALUE dest, VALUE obj)
VALUE rb_convert_type(VALUE val, int type, const char *tname, const char *method)
static VALUE false_and(VALUE obj, VALUE obj2)
VALUE rb_mod_init_copy(VALUE clone, VALUE orig)
static VALUE nil_inspect(VALUE obj)
VALUE rb_obj_trust(VALUE obj)
static VALUE rb_mod_attr_writer(int argc, VALUE *argv, VALUE klass)
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
static VALUE rb_obj_ivar_get(VALUE obj, VALUE iv)
void Init_class_hierarchy(void)
#define RBASIC_SET_CLASS(obj, cls)
static ID check_setter_id(VALUE obj, VALUE *pname, int(*valid_id_p)(ID), int(*valid_name_p)(VALUE), const char *message, size_t message_len)
void rb_raise(VALUE exc, const char *fmt,...)
double rb_num2dbl(VALUE val)
VALUE rb_ivar_get(VALUE, ID)
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
static VALUE rb_obj_cmp(VALUE obj1, VALUE obj2)
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
int rb_const_defined(VALUE, ID)
void rb_include_module(VALUE klass, VALUE module)
VALUE rb_to_float(VALUE val)
static VALUE rb_mod_singleton_p(VALUE klass)
static VALUE rb_obj_match(VALUE obj1, VALUE obj2)
static VALUE rb_mod_const_get(int argc, VALUE *argv, VALUE mod)
static const char invalid_attribute_name[]
VALUE rb_Integer(VALUE val)
static VALUE class_search_ancestor(VALUE cl, VALUE c)
#define RGENGC_WB_PROTECTED_OBJECT
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
static const char wrong_constant_name[]
static int rb_is_attr_name(VALUE name)
static VALUE rb_mod_initialize_clone(VALUE clone, VALUE orig)
VALUE rb_to_int(VALUE val)
static void no_dig_method(int found, VALUE recv, ID mid, int argc, const VALUE *argv, VALUE data)
VALUE rb_obj_untaint(VALUE obj)
static VALUE nil_to_i(VALUE obj)
void rb_undef_method(VALUE klass, const char *name)
VALUE rb_ivar_defined(VALUE, ID)
static VALUE rb_obj_not_match(VALUE obj1, VALUE obj2)
#define rb_name_err_raise(mesg, recv, name)
static VALUE rb_obj_dummy(void)
VALUE rb_mod_remove_cvar(VALUE, VALUE)
void rb_ivar_foreach(VALUE, int(*)(ANYARGS), st_data_t)
const char * rb_obj_classname(VALUE)
static double rb_float_flonum_value(VALUE v)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
static VALUE rb_f_array(VALUE obj, VALUE arg)
#define NEWOBJ_OF(obj, type, klass, flags)
static VALUE rb_mod_cvar_get(VALUE obj, VALUE iv)
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
VALUE rb_obj_class(VALUE obj)
VALUE rb_obj_dup(VALUE obj)
#define RB_TYPE_P(obj, type)
static VALUE true_or(VALUE obj, VALUE obj2)
VALUE rb_obj_not(VALUE obj)
rb_encoding * rb_default_external_encoding(void)
static VALUE false_or(VALUE obj, VALUE obj2)
VALUE rb_cvar_defined(VALUE, ID)
VALUE rb_class_inherited(VALUE super, VALUE klass)
Calls Class::inherited.
static VALUE rb_to_integer(VALUE val, const char *method)
#define id_for_var(obj, name, part, type)
#define rb_intern_str(string)
VALUE rb_class_name(VALUE)
VALUE rb_obj_reveal(VALUE obj, VALUE klass)
VALUE rb_dbl2big(double d)
int rb_block_given_p(void)
static VALUE rb_class_allocate_instance(VALUE klass)
static VALUE rb_f_hash(VALUE obj, VALUE arg)
void rb_gc_copy_finalizer(VALUE dest, VALUE obj)
static VALUE nil_to_f(VALUE obj)
static VALUE rb_true(VALUE obj)
VALUE rb_ary_at(VALUE ary, VALUE pos)
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
FUNC_MINIMIZED(static VALUE rb_f_float(VALUE obj, VALUE arg))
void rb_attr(VALUE, ID, int, int, int)
VALUE rb_str_cat2(VALUE, const char *)
VALUE rb_obj_as_string(VALUE)
VALUE rb_mod_attr(int argc, VALUE *argv, VALUE klass)
static VALUE rb_mod_freeze(VALUE mod)
void rb_check_trusted(VALUE obj)
VALUE rb_check_to_integer(VALUE val, const char *method)
long rb_objid_hash(st_index_t index)
VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj)
static void implicit_conversion_to_float(VALUE val)
static VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super)
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
VALUE rb_class_get_superclass(VALUE klass)
static VALUE rb_obj_singleton_class(VALUE obj)
VALUE rb_obj_freeze(VALUE obj)
static VALUE rb_class_initialize(int argc, VALUE *argv, VALUE klass)
static int rb_is_attr_id(ID id)
VALUE rb_class_search_ancestor(VALUE cl, VALUE c)
VALUE rb_struct_lookup(VALUE s, VALUE idx)
VALUE rb_Float(VALUE val)
VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type)
static VALUE false_xor(VALUE obj, VALUE obj2)
void rb_undefined_alloc(VALUE klass)
#define MEMCPY(p1, p2, type, n)
rb_alloc_func_t rb_get_alloc_func(VALUE)
VALUE rb_obj_equal(VALUE obj1, VALUE obj2)
#define RUBY_DTRACE_CREATE_HOOK(name, arg)
static VALUE rb_f_float(VALUE obj, VALUE arg)
VALUE rb_const_get(VALUE, ID)
VALUE rb_str_subseq(VALUE, long, long)
void rb_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
static VALUE rb_mod_eqq(VALUE mod, VALUE arg)
static VALUE rb_mod_initialize(VALUE module)
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg)
void rb_deprecate_constant(VALUE mod, const char *name)
VALUE rb_obj_untrusted(VALUE obj)
VALUE rb_obj_hash(VALUE obj)
VALUE rb_sprintf(const char *format,...)
static VALUE true_to_s(VALUE obj)
int rb_is_const_name(VALUE name)
VALUE rb_const_missing(VALUE klass, VALUE name)
VALUE rb_class_superclass(VALUE klass)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
VALUE rb_ivar_set(VALUE, ID, VALUE)
VALUE rb_check_hash_type(VALUE hash)
unsigned char buf[MIME_BUF_SIZE]
VALUE rb_class_instance_methods(int argc, const VALUE *argv, VALUE mod)
static int special_object_p(VALUE obj)
void rb_const_set(VALUE, ID, VALUE)
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
static VALUE nil_to_s(VALUE obj)
const char * rb_class2name(VALUE)
VALUE rb_mod_class_variables(int, const VALUE *, VALUE)
RUBY_EXTERN VALUE rb_cInteger
VALUE rb_make_metaclass(VALUE obj, VALUE unused)
VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj)
static double rb_float_noflonum_value(VALUE v)
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
static int to_float(VALUE *valp)
VALUE rb_check_convert_type(VALUE val, int type, const char *tname, const char *method)
#define rb_enc_asciicompat(enc)
VALUE rb_obj_untrust(VALUE obj)
VALUE rb_String(VALUE val)
#define IMPLICIT_CONVERSIONS
RUBY_EXTERN VALUE rb_cNumeric
int rb_is_const_sym(VALUE sym)
VALUE rb_obj_remove_instance_variable(VALUE, VALUE)
VALUE rb_check_to_int(VALUE val)
#define RB_FLOAT_TYPE_P(obj)
VALUE rb_fstring_new(const char *ptr, long len)
VALUE rb_class_real(VALUE cl)
static VALUE rb_obj_ivar_set(VALUE obj, VALUE iv, VALUE val)
register unsigned int len
VALUE rb_mod_constants(int, const VALUE *, VALUE)
static VALUE true_xor(VALUE obj, VALUE obj2)
VALUE rb_obj_dig(int argc, VALUE *argv, VALUE obj, VALUE notfound)
VALUE rb_obj_alloc(VALUE klass)
int rb_const_defined_at(VALUE, ID)
rb_encoding * rb_enc_get(VALUE obj)
void rb_singleton_class_attached(VALUE klass, VALUE obj)
Attach a object to a singleton class.
static int basic_to_f_p(VALUE klass)
VALUE rb_module_new(void)
static VALUE convert_type(VALUE val, const char *tname, const char *method, int raise)
#define RBASIC_CLASS(obj)
static void conversion_to_float(VALUE val)
static VALUE true_and(VALUE obj, VALUE obj2)
static int dig_basic_p(VALUE obj, struct dig_method *cache)
VALUE rb_check_array_type(VALUE ary)
VALUE rb_hash_aref(VALUE hash, VALUE key)
static VALUE rb_f_string(VALUE obj, VALUE arg)
static VALUE rb_obj_inspect(VALUE obj)
VALUE rb_str_catf(VALUE str, const char *format,...)
#define rat2dbl_without_to_f(x)
static VALUE nil_to_a(VALUE obj)
VALUE rb_check_string_type(VALUE)
void InitVM_Object(void)
Initializes the world of objects and classes.
VALUE rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj)
VALUE rb_obj_init_dup_clone(VALUE obj, VALUE orig)
VALUE rb_mod_remove_const(VALUE, VALUE)
static VALUE rb_obj_clone2(int argc, VALUE *argv, VALUE obj)
int rb_is_local_name(VALUE name)
int rb_method_basic_definition_p(VALUE, ID)
static VALUE rb_obj_itself(VALUE obj)
#define special_const_to_float(val, pre, post)
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
static VALUE inspect_obj(VALUE obj, VALUE str, int recur)
VALUE rb_obj_is_kind_of(VALUE obj, VALUE c)
void rb_obj_infect(VALUE obj1, VALUE obj2)
void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
VALUE rb_class_private_instance_methods(int argc, const VALUE *argv, VALUE mod)
VALUE rb_obj_init_copy(VALUE obj, VALUE orig)
int rb_is_local_id(ID id)
VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj)
VALUE rb_Array(VALUE val)
static VALUE rb_mod_cvar_defined(VALUE obj, VALUE iv)
static VALUE rb_class_s_alloc(VALUE klass)
static VALUE rb_mod_to_s(VALUE klass)
static VALUE rb_mod_const_set(VALUE mod, VALUE name, VALUE value)
VALUE rb_const_get_at(VALUE, ID)
static int inspect_i(st_data_t k, st_data_t v, st_data_t a)
VALUE rb_obj_tainted(VALUE obj)
static VALUE rb_mod_const_defined(int argc, VALUE *argv, VALUE mod)
RUBY_EXTERN VALUE rb_cRational
NORETURN(static void conversion_mismatch(VALUE, const char *, const char *, VALUE))
#define StringValuePtr(v)
VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2)
VALUE rb_mod_included_modules(VALUE mod)
static VALUE rb_false(VALUE obj)
#define big2dbl_without_to_f(x)
static VALUE rb_f_integer(int argc, VALUE *argv, VALUE obj)
void rb_warning(const char *fmt,...)
#define rb_check_frozen(obj)
#define CONST_ID(var, str)
int rb_eql(VALUE obj1, VALUE obj2)
VALUE rb_str_intern(VALUE)
#define rb_intern_const(str)
static VALUE false_to_s(VALUE obj)
void rb_copy_generic_ivar(VALUE, VALUE)
#define SPECIAL_CONST_P(x)
VALUE rb_define_module(const char *name)
int rb_enc_str_asciionly_p(VALUE)
VALUE rb_usascii_str_new(const char *, long)
static VALUE rb_mod_gt(VALUE mod, VALUE arg)
static VALUE numeric_to_float(VALUE val)
#define RB_INTEGER_TYPE_P(obj)
VALUE rb_obj_clone(VALUE obj)
static VALUE class_or_module_required(VALUE c)
VALUE(* rb_alloc_func_t)(VALUE)
VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj)
VALUE rb_obj_hide(VALUE obj)
VALUE rb_class_inherited_p(VALUE mod, VALUE arg)
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
VALUE rb_str_append(VALUE, VALUE)
void rb_invalid_str(const char *str, const char *type)
VALUE rb_class_boot(VALUE super)
A utility function that wraps class_alloc.
VALUE rb_obj_frozen_p(VALUE obj)
#define rb_obj_instance_variables(object)
st_index_t rb_ivar_count(VALUE)
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj)
VALUE rb_any_to_s(VALUE obj)
VALUE rb_attr_get(VALUE, ID)
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
VALUE rb_obj_is_instance_of(VALUE obj, VALUE c)
static VALUE rb_module_s_alloc(VALUE klass)
#define CLASS_OR_MODULE_P(obj)