diff options
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -143,8 +143,9 @@ rb_get_expanded_load_path(void) } static VALUE -load_path_getter(ID id, rb_vm_t *vm) +load_path_getter(ID id, VALUE * p) { + rb_vm_t *vm = (void *)p; return vm->load_path; } @@ -154,6 +155,12 @@ get_loaded_features(void) return GET_VM()->loaded_features; } +static VALUE +get_$LOADED_FEATURES(ID _x, VALUE *_y) +{ + return get_loaded_features(); +} + static void reset_loaded_features_snapshot(void) { @@ -1258,8 +1265,8 @@ Init_load(void) vm->load_path_check_cache = 0; rb_define_singleton_method(vm->load_path, "resolve_feature_path", rb_resolve_feature_path, 1); - rb_define_virtual_variable("$\"", get_loaded_features, 0); - rb_define_virtual_variable("$LOADED_FEATURES", get_loaded_features, 0); + rb_define_virtual_variable("$\"", get_$LOADED_FEATURES, 0); + rb_define_virtual_variable("$LOADED_FEATURES", get_$LOADED_FEATURES, 0); vm->loaded_features = rb_ary_new(); vm->loaded_features_snapshot = rb_ary_tmp_new(0); vm->loaded_features_index = st_init_numtable(); |