20 #include "ccan/list/list.h" 25 static ID autoload, classpath, tmp_classpath, classid;
27 static void check_before_mod_set(
VALUE,
ID,
VALUE,
const char *);
29 static VALUE rb_const_search(
VALUE klass,
ID id,
int exclude,
int recurse,
int visibility);
31 static st_table *generic_iv_tbl_compat;
192 if (cid) path = find_class_path(
klass, cid);
195 path = find_class_path(
klass, (
ID)0);
214 rb_bug(
"class path is not set properly");
218 return find_class_path(
klass, (
ID)0);
247 path =
rb_sprintf(
"#<Module:%p>", (
void*)obj);
262 VALUE path = classname(klass, permanent);
280 path = rb_tmp_class_path(
RBASIC(klass)->klass, &perm, cache_path);
284 return cache_path(klass, path);
291 return rb_ivar_set(obj, tmp_classpath, make_temporary_path(obj, name));
298 VALUE path = rb_tmp_class_path(klass, &permanent, ivar_cache);
306 return make_temporary_path(obj, name);
313 VALUE path = rb_tmp_class_path(klass, &permanent, null_cache);
324 if (!ivtbl)
return Qnil;
340 return rb_tmp_class_path(klass, &permanent, never_cache);
347 ID pathid = classpath;
354 str =
rb_str_dup(rb_tmp_class_path(under, &permanent, ivar_cache));
359 pathid = tmp_classpath;
370 ID pathid = classpath;
377 str =
rb_str_dup(rb_tmp_class_path(under, &permanent, ivar_cache));
381 pathid = tmp_classpath;
402 if (path == pend || path[0] ==
'#') {
407 while (p < pend && *p !=
':') p++;
409 if (p < pend && p[0] ==
':') {
410 if ((
size_t)(pend - p) < 2 || p[1] !=
':')
goto undefined_class;
420 if (c ==
Qundef)
goto undefined_class;
524 var->
data = (
void*)val;
541 var->
data = (
void*)val;
555 if (!var)
return Qnil;
562 *(
VALUE *)data = val;
578 mark_global_entry(
VALUE v,
void *ignored)
601 global_id(
const char *
name)
605 if (name[0] ==
'$')
id =
rb_intern(name);
610 memcpy(buf+1, name, len);
624 ID id = global_id(name);
627 gvar->
data = (
void*)var;
706 trace->
func = rb_trace_eval;
723 while (trace->
next) {
780 if (trace->
data == cmd) {
890 if (!
NIL_P(backref)) {
894 for (i = 1; i <= nmatch; ++i) {
898 buf[1] = (char)(i +
'0');
943 entry1->
var = entry2->
var;
963 if (gen_ivtbl_get(obj, &ivtbl)) {
968 if (index < ivtbl->
numiv) {
972 return ret ==
Qundef ? undef : ret;
984 if (gen_ivtbl_get(obj, &ivtbl)) {
989 if (index < ivtbl->
numiv) {
992 return ret ==
Qundef ? undef : ret;
1000 gen_ivtbl_bytes(
size_t n)
1012 for (; len < n; len++) {
1021 gen_ivtbl_dup(
const struct gen_ivtbl *orig)
1023 size_t s = gen_ivtbl_bytes(orig->
numiv);
1026 memcpy(ivtbl, orig, s);
1036 uint32_t newsize = (index+1) + (index+1)/4;
1065 newsize = iv_index_tbl_newsize(ivup);
1066 ivtbl = gen_ivtbl_resize(ivtbl, newsize);
1074 generic_ivar_defined(
VALUE obj,
ID id)
1080 if (!iv_index_tbl)
return Qfalse;
1082 if (!gen_ivtbl_get(obj, &ivtbl))
return Qfalse;
1098 if (!iv_index_tbl)
return 0;
1099 if (!
st_lookup(iv_index_tbl, key, &index))
return 0;
1100 if (!gen_ivtbl_get(obj, &ivtbl))
return 0;
1102 if (index < ivtbl->
numiv) {
1104 *valp = ivtbl->
ivptr[index];
1113 gen_ivtbl_mark(
const struct gen_ivtbl *ivtbl)
1117 for (i = 0; i < ivtbl->
numiv; i++) {
1127 if (gen_ivtbl_get(obj, &ivtbl)) {
1128 gen_ivtbl_mark(ivtbl);
1141 if (generic_iv_tbl_compat) {
1154 if (gen_ivtbl_get(obj, &ivtbl))
1155 return gen_ivtbl_bytes(ivtbl->
numiv);
1160 gen_ivtbl_count(
const struct gen_ivtbl *ivtbl)
1165 for (i = 0; i < ivtbl->
numiv; i++) {
1188 if (!iv_index_tbl)
break;
1190 if (len <= index)
break;
1199 return (
VALUE)index;
1203 return generic_ivar_get(obj,
id, undef);
1243 if (!iv_index_tbl)
break;
1245 if (len <= index)
break;
1255 return (
VALUE)index;
1259 return generic_ivar_delete(obj,
id, undef);
1268 return rb_ivar_delete(obj,
id,
Qnil);
1272 iv_index_tbl_make(
VALUE obj)
1277 if (!iv_index_tbl) {
1281 return iv_index_tbl;
1305 iv_index_tbl_extend(&ivup,
id);
1309 ivup.u.ivtbl->ivptr[ivup.index] =
val;
1328 iv_index_tbl_extend(&ivup,
id);
1330 if (len <= ivup.
index) {
1341 uint32_t newsize = iv_index_tbl_newsize(&ivup);
1346 RBASIC(obj)->flags &= ~ROBJECT_EMBED;
1347 ROBJECT(obj)->as.heap.ivptr = newptr;
1351 newptr =
ROBJECT(obj)->as.heap.ivptr;
1353 for (; len < newsize; len++)
1355 ROBJECT(obj)->as.heap.numiv = newsize;
1367 generic_ivar_set(obj,
id, val);
1384 if (!iv_index_tbl)
break;
1398 return generic_ivar_defined(obj,
id);
1417 return (data->
func)((
ID)key, val, data->
arg);
1451 if (index < arg->ivtbl->
numiv) {
1454 return (arg->
func)((
ID)key, val, arg->
arg);
1466 if (!iv_index_tbl)
return;
1467 if (!gen_ivtbl_get(obj, &data.
ivtbl))
return;
1489 iv_index_tbl_extend(&ivup,
id);
1491 uint32_t newsize = iv_index_tbl_newsize(&ivup);
1492 c->
ivtbl = gen_ivtbl_resize(c->
ivtbl, newsize);
1516 if (gen_ivtbl_get(obj, &ivtbl)) {
1520 if (gen_ivtbl_count(ivtbl) == 0)
1523 if (gen_ivtbl_get(clone, &c.
ivtbl)) {
1534 gen_ivar_each(obj, gen_ivar_copy, (
st_data_t)&c);
1549 obj_ivar_each(obj, func, arg);
1559 gen_ivar_each(obj, func, arg);
1577 for (i = count = 0; i < num; ++i) {
1578 if (ivptr[i] !=
Qundef) {
1595 if (gen_ivtbl_get(obj, &ivtbl)) {
1596 return gen_ivtbl_count(ivtbl);
1643 #define rb_is_constant_id rb_is_const_id 1644 #define rb_is_constant_name rb_is_const_name 1645 #define id_for_var(obj, name, part, type) \ 1646 id_for_var_message(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name") 1647 #define id_for_var_message(obj, name, type, message) \ 1648 check_id_type(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message)) 1651 int (*valid_id_p)(
ID),
int (*valid_name_p)(
VALUE),
1652 const char *message,
size_t message_len)
1655 VALUE name = *pname;
1657 if (
id ? !valid_id_p(
id) : !valid_name_p(name)) {
1703 if (!iv_index_tbl)
break;
1721 if (generic_ivar_remove(obj,
id, &val)) {
1736 uninitialized_constant(
VALUE klass,
VALUE name)
1795 uninitialized_constant(klass, name);
1801 autoload_mark(
void *ptr)
1807 autoload_free(
void *ptr)
1813 autoload_memsize(
const void *ptr)
1821 {autoload_mark, autoload_free, autoload_memsize,},
1825 #define check_autoload_table(av) \ 1826 (struct st_table *)rb_check_typeddata((av), &autoload_data_type) 1850 struct list_node node;
1851 struct list_head head;
1863 autoload_i_mark(
void *ptr)
1871 autoload_i_memsize(
const void *ptr)
1879 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
1882 #define check_autoload_data(av) \ 1883 (struct autoload_data_i *)rb_check_typeddata((av), &autoload_data_i_type) 1888 if (!file || !*file) {
1961 autoload_provided(
VALUE arg)
1963 const char **p = (
const char **)arg;
1968 reset_safe(
VALUE safe)
1975 check_autoload_required(
VALUE mod,
ID id,
const char **loadingpath)
1979 const char *loading;
2007 if (loadingpath && loading) {
2008 *loadingpath = loading;
2026 *value = ele->
value;
2035 autoload_defined_p(
VALUE mod,
ID id)
2054 autoload_const_set(
VALUE arg)
2059 check_before_mod_set(klass,
id, args->
value,
"constant");
2060 const_tbl_update(args);
2065 autoload_require(
VALUE arg)
2077 autoload_reset(
VALUE arg)
2080 int need_wakeups = 0;
2093 args.id = state->
id;
2098 reset_safe, (
VALUE)safe_backup);
2123 autoload_sleep(
VALUE arg)
2139 autoload_sleep_done(
VALUE arg)
2154 const char *loading = 0, *src;
2158 if (!autoload_defined_p(mod,
id))
return Qfalse;
2159 load = check_autoload_required(mod,
id, &loading);
2160 if (!load)
return Qfalse;
2162 if (src && loading && strcmp(src, loading) == 0)
return Qfalse;
2174 ele->
state = &state;
2189 autoload_sleep_done, (
VALUE)&state);
2194 autoload_reset, (
VALUE)&state);
2206 while (!autoload_defined_p(mod,
id)) {
2208 if (!mod)
return Qnil;
2210 load = check_autoload_required(mod,
id, 0);
2211 if (!load)
return Qnil;
2230 rb_const_get_0(
VALUE klass,
ID id,
int exclude,
int recurse,
int visibility)
2232 VALUE c = rb_const_search(klass,
id, exclude, recurse, visibility);
2233 if (c !=
Qundef)
return c;
2238 rb_const_search(
VALUE klass,
ID id,
int exclude,
int recurse,
int visibility)
2245 while (
RTEST(tmp)) {
2257 if (am == tmp)
break;
2273 if (!recurse)
break;
2364 autoload_delete(mod,
id);
2380 sv_i(
ID key,
VALUE v,
void *a)
2392 rb_local_constants_i(
ID const_name,
VALUE const_value,
void *ary)
2401 rb_local_constants(
VALUE mod)
2492 if (
RTEST(inherit)) {
2496 return rb_local_constants(mod);
2501 rb_const_defined_0(
VALUE klass,
ID id,
int exclude,
int recurse,
int visibility)
2514 if (ce->
value ==
Qundef && !check_autoload_required(tmp,
id, 0) &&
2519 if (!recurse)
break;
2551 return rb_const_defined_0(klass,
id,
TRUE,
TRUE,
TRUE);
2567 check_before_mod_set(
VALUE klass,
ID id,
VALUE val,
const char *dest)
2583 check_before_mod_set(klass,
id, val,
"constant");
2596 const_tbl_update(&args);
2644 load = autoload_data(klass,
id);
2654 autoload_delete(klass,
id);
2658 visibility = ce->
flag;
2666 "previous definition of %"PRIsVALUE
" was here", name);
2670 setup_const_entry(ce, klass, val, visibility);
2677 setup_const_entry(ce, klass, val, visibility);
2685 ce->
flag = visibility;
2696 rb_warn(
"rb_define_const: invalid name `%s' for constant", name);
2722 for (i = 0; i <
argc; i++) {
2723 VALUE val = argv[i];
2807 original_module(
VALUE c)
2822 cvar_front_klass(
VALUE klass)
2833 #define CVAR_FOREACH_ANCESTORS(klass, v, r) \ 2834 for (klass = cvar_front_klass(klass); klass; klass = RCLASS_SUPER(klass)) { \ 2835 if (cvar_lookup_at(klass, id, (v))) { \ 2840 #define CVAR_LOOKUP(v,r) do {\ 2841 if (cvar_lookup_at(klass, id, (v))) {r;}\ 2842 CVAR_FOREACH_ANCESTORS(klass, v, r);\ 2848 VALUE tmp, front = 0, target = 0;
2851 CVAR_LOOKUP(0, {
if (!front) front = klass; target = klass;});
2853 if (front && target != front) {
2870 check_before_mod_set(target,
id, val,
"class variable");
2881 VALUE tmp, front = 0, target = 0;
2885 CVAR_LOOKUP(&value, {
if (!front) front = klass; target = klass;});
2890 if (front && target != front) {
2908 if (!klass)
return Qfalse;
2914 cv_intern(
VALUE klass,
const char *name)
2927 ID id = cv_intern(klass, name);
2934 ID id = cv_intern(klass, name);
2941 ID id = cv_intern(klass, name);
2958 mod_cvar_at(
VALUE mod,
void *data)
2971 mod_cvar_of(
VALUE mod,
void *data)
2975 data = mod_cvar_at(tmp, data);
2991 cvar_list(
void *data)
3036 if (
RTEST(inherit)) {
3037 tbl = mod_cvar_of(mod, 0);
3040 tbl = mod_cvar_at(mod, 0);
3042 return cvar_list(tbl);
union autoload_state::@124 waitq
st_table * rb_st_copy(VALUE obj, struct st_table *orig_tbl)
void rb_mark_generic_ivar(VALUE obj)
void rb_define_readonly_variable(const char *name, const VALUE *var)
void rb_define_hooked_variable(const char *name, VALUE *var, VALUE(*getter)(ANYARGS), void(*setter)(ANYARGS))
void rb_set_class_path_string(VALUE klass, VALUE under, VALUE name)
VALUE rb_gvar_defined(struct rb_global_entry *entry)
ID rb_check_id(volatile VALUE *)
Returns ID for the given name if it is interned already, or 0.
int rb_is_instance_id(ID id)
void rb_warn(const char *fmt,...)
void rb_bug(const char *fmt,...)
void rb_vm_inc_const_missing_count(void)
int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp)
rb_const_entry_t * rb_const_lookup(VALUE klass, ID id)
#define RUBY_TYPED_FREE_IMMEDIATELY
size_t strlen(const char *)
VALUE rb_mod_const_missing(VALUE klass, VALUE name)
void * rb_mod_const_at(VALUE mod, void *data)
VALUE rb_gvar_undef_getter(ID id, void *data, struct rb_global_variable *var)
#define RCLASS_CONST_TBL(c)
VALUE rb_f_global_variables(void)
ID rb_intern2(const char *, long)
#define RB_OBJ_WRITTEN(a, oldv, b)
void rb_define_const(VALUE klass, const char *name, VALUE val)
void rb_define_variable(const char *name, VALUE *var)
void rb_thread_sleep_deadly(void)
VALUE rb_fstring_cstr(const char *str)
void rb_raise(VALUE exc, const char *fmt,...)
#define RB_CONST_DEPRECATED_P(ce)
#define rb_name_err_raise_str(mesg, recv, name)
VALUE rb_ivar_defined(VALUE obj, ID id)
void rb_autoload_str(VALUE mod, ID id, VALUE file)
#define TypedData_Wrap_Struct(klass, data_type, sval)
ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc)
int rb_is_const_id(ID id)
rb_gvar_getter_t * getter
VALUE(* path_cache_func)(VALUE obj, VALUE name)
void rb_autoload(VALUE mod, ID id, const char *file)
VALUE rb_autoload_p(VALUE mod, ID id)
void rb_define_virtual_variable(const char *name, VALUE(*getter)(ANYARGS), void(*setter)(ANYARGS))
VALUE rb_ary_push(VALUE ary, VALUE item)
VALUE rb_ivar_get(VALUE obj, ID id)
VALUE rb_const_list(void *data)
void rb_define_global_const(const char *name, VALUE val)
const char * rb_class2name(VALUE klass)
const char * rb_sourcefile(void)
#define check_autoload_table(av)
VALUE rb_public_const_get_at(VALUE klass, ID id)
VALUE rb_mod_remove_const(VALUE mod, VALUE name)
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
void rb_gc_mark_global_tbl(void)
#define ROBJECT_IV_INDEX_TBL(o)
VALUE rb_backref_get(void)
VALUE rb_mod_name(VALUE mod)
VALUE rb_cv_get(VALUE klass, const char *name)
VALUE rb_path2class(const char *path)
rb_gvar_marker_t * marker
void rb_clear_constant_cache(void)
int rb_public_const_defined(VALUE klass, ID id)
void rb_gc_mark(VALUE ptr)
int rb_feature_provided(const char *, const char **)
int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg)
VALUE rb_gvar_get(struct rb_global_entry *entry)
#define check_autoload_data(av)
VALUE rb_const_get(VALUE klass, ID id)
int rb_public_const_defined_at(VALUE klass, ID id)
VALUE rb_public_const_get(VALUE klass, ID id)
VALUE rb_ensure(VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*e_proc)(ANYARGS), VALUE data2)
An equivalent to ensure clause.
struct rb_global_entry * rb_global_entry(ID id)
void rb_name_error(ID id, const char *fmt,...)
void rb_deprecate_constant(VALUE mod, const char *name)
VALUE rb_f_untrace_var(int argc, const VALUE *argv)
int(* func)(ID key, VALUE val, st_data_t arg)
int rb_match_count(VALUE match)
#define rb_name_err_raise(mesg, recv, name)
RUBY_FUNC_EXPORTED size_t rb_generic_ivar_memsize(VALUE obj)
#define id_for_var(obj, name, part, type)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
void(* func)(VALUE arg, VALUE val)
VALUE rb_autoload_load(VALUE mod, ID id)
#define CVAR_LOOKUP(v, r)
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
#define RB_TYPE_P(obj, type)
VALUE rb_gvar_val_getter(ID id, void *data, struct rb_global_variable *var)
VALUE rb_cvar_defined(VALUE klass, ID id)
void rb_const_set(VALUE klass, ID id, VALUE val)
#define id_for_var_message(obj, name, type, message)
VALUE rb_search_class_path(VALUE klass)
VALUE rb_attr_delete(VALUE obj, ID id)
VALUE rb_class_path(VALUE klass)
VALUE rb_gvar_set(struct rb_global_entry *entry, VALUE val)
RUBY_EXTERN VALUE rb_cObject
int rb_is_class_id(ID id)
size_t st_memsize(const st_table *tab)
VALUE rb_str_cat2(VALUE, const char *)
VALUE rb_thread_current(void)
void rb_frozen_class_p(VALUE klass)
Asserts that klass is not a frozen class.
int rb_match_nth_defined(int nth, VALUE match)
struct rb_id_table * rb_id_table_create(size_t capa)
void rb_compile_warn(const char *file, int line, const char *fmt,...)
const char * rb_obj_classname(VALUE obj)
int rb_class_ivar_set(VALUE obj, ID key, VALUE value)
#define ALLOCA_N(type, n)
RUBY_EXTERN VALUE rb_cModule
VALUE rb_gv_get(const char *name)
void rb_cv_set(VALUE klass, const char *name, VALUE val)
#define RUBY_FUNC_EXPORTED
#define MEMCPY(p1, p2, type, n)
int rb_const_defined(VALUE klass, ID id)
void rb_set_class_path(VALUE klass, VALUE under, const char *name)
VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)
VALUE rb_thread_wakeup_alive(VALUE)
int rb_public_const_defined_from(VALUE klass, ID id)
VALUE rb_gvar_getter_t(ID id, void *data, struct rb_global_variable *gvar)
void rb_name_error_str(VALUE str, const char *fmt,...)
VALUE rb_class_name(VALUE klass)
VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE mod)
void st_foreach_safe(st_table *table, int(*func)(ANYARGS), st_data_t a)
VALUE rb_str_subseq(VALUE, long, long)
int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val)
#define REALLOC_N(var, type, n)
void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data)
VALUE rb_gvar_var_getter(ID id, void *data, struct rb_global_variable *gvar)
void rb_gvar_var_setter(VALUE val, ID id, void *data, struct rb_global_variable *g)
int rb_const_defined_at(VALUE klass, ID id)
VALUE rb_sprintf(const char *format,...)
void rb_gvar_readonly_setter(VALUE v, ID id, void *d, struct rb_global_variable *g)
void rb_gvar_val_marker(VALUE *var)
VALUE rb_attr_get(VALUE obj, ID id)
int rb_id_table_delete(struct rb_id_table *tbl, ID id)
VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name)
size_t rb_id_table_size(const struct rb_id_table *tbl)
void rb_gvar_val_setter(VALUE val, ID id, void *data, struct rb_global_variable *var)
void Init_var_tables(void)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj)
unsigned char buf[MIME_BUF_SIZE]
void rb_vm_pop_cfunc_frame(void)
VALUE rb_const_get_at(VALUE klass, ID id)
union ivar_update::@123 u
int rb_autoloading_value(VALUE mod, ID id, VALUE *value)
VALUE rb_vm_top_self(void)
#define RB_CONST_PRIVATE_P(ce)
VALUE rb_public_const_get_from(VALUE klass, ID id)
void rb_mark_tbl(st_table *tbl)
struct autoload_data_i * ele
#define rb_enc_asciicompat(enc)
VALUE rb_str_new_cstr(const char *)
void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id)
void rb_define_class_variable(VALUE klass, const char *name, VALUE val)
VALUE rb_fstring_new(const char *ptr, long len)
struct rb_global_variable * var
int rb_thread_to_be_killed(VALUE thread)
register unsigned int len
void rb_set_safe_level_force(int)
VALUE rb_obj_instance_variables(VALUE obj)
#define RB_OBJ_WRITE(a, slot, b)
VALUE rb_class_path_cached(VALUE klass)
rb_encoding * rb_enc_get(VALUE obj)
st_index_t rb_ivar_count(VALUE obj)
void rb_name_class(VALUE klass, ID id)
ID rb_frame_callee(void)
The name of the current method.
VALUE rb_block_proc(void)
void rb_ivar_foreach(VALUE obj, int(*func)(ANYARGS), st_data_t arg)
VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
VALUE rb_iv_get(VALUE obj, const char *name)
VALUE rb_cvar_get(VALUE klass, ID id)
VALUE rb_gv_set(const char *name, VALUE val)
VALUE rb_path_to_class(VALUE pathname)
#define RB_CONST_PUBLIC_P(ce)
#define RCLASS_IV_INDEX_TBL(c)
VALUE rb_const_get_from(VALUE klass, ID id)
void rb_gvar_var_marker(VALUE *var)
void rb_warning(const char *fmt,...)
void rb_gvar_marker_t(VALUE *var)
struct rb_encoding_entry * list
void rb_alias_variable(ID name1, ID name2)
#define TypedData_Make_Struct(klass, type, data_type, sval)
rb_gvar_setter_t * setter
VALUE rb_const_missing(VALUE klass, VALUE name)
VALUE rb_eval_cmd(VALUE, VALUE, int)
void rb_cvar_set(VALUE klass, ID id, VALUE val)
struct autoload_state * state
VALUE rb_mod_remove_cvar(VALUE mod, VALUE name)
#define RB_DEBUG_COUNTER_INC(type)
VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE mod)
void rb_gc_mark_maybe(VALUE obj)
VALUE rb_str_new_frozen(VALUE)
VALUE rb_source_location(int *pline)
struct rb_id_table * rb_global_tbl
#define rb_check_frozen(obj)
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
rb_id_table_iterator_result
#define RUBY_TYPED_DEFAULT_FREE
VALUE rb_str_intern(VALUE)
#define rb_intern_const(str)
VALUE rb_class_path_no_cache(VALUE klass)
#define SPECIAL_CONST_P(x)
void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data)
int(* func)(ID key, VALUE val, st_data_t arg)
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
void rb_gvar_setter_t(VALUE val, ID id, void *data, struct rb_global_variable *gvar)
void * rb_mod_const_of(VALUE mod, void *data)
VALUE rb_class_real(VALUE cl)
Looks up the nearest ancestor of cl, skipping singleton classes or module inclusions.
VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef)
VALUE rb_f_trace_var(int argc, const VALUE *argv)
VALUE rb_str_append(VALUE, VALUE)
VALUE rb_const_remove(VALUE mod, ID id)
void rb_free_generic_ivar(VALUE obj)
void rb_copy_generic_ivar(VALUE clone, VALUE obj)
void rb_gvar_undef_marker(VALUE *var)
int rb_const_defined_from(VALUE klass, ID id)
void rb_gvar_undef_setter(VALUE val, ID id, void *d, struct rb_global_variable *var)
NORETURN(static void uninitialized_constant(VALUE, VALUE))