diff options
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/variable.c b/variable.c index 9da4ee217d..d07f9ff9dd 100644 --- a/variable.c +++ b/variable.c @@ -1941,7 +1941,7 @@ rb_const_remove(VALUE mod, ID id) rb_class_name(mod), QUOTE_ID(id)); } - rb_clear_cache(); + rb_clear_constant_cache(); val = ((rb_const_entry_t*)v)->value; if (val == Qundef) { @@ -2151,7 +2151,7 @@ rb_const_set(VALUE klass, ID id, VALUE val) load = autoload_data(klass, id); /* for autoloading thread, keep the defined value to autoloading storage */ if (load && (ele = check_autoload_data(load)) && (ele->thread == rb_thread_current())) { - rb_clear_cache(); + rb_clear_constant_cache(); ele->value = val; /* autoload_i is shady */ return; @@ -2175,7 +2175,7 @@ rb_const_set(VALUE klass, ID id, VALUE val) } } - rb_clear_cache(); + rb_clear_constant_cache(); ce = ALLOC(rb_const_entry_t); @@ -2222,7 +2222,7 @@ set_const_visibility(VALUE mod, int argc, VALUE *argv, rb_const_flag_t flag) id = rb_check_id(&val); if (!id) { if (i > 0) { - rb_clear_cache(); + rb_clear_constant_cache(); } rb_name_error_str(val, "constant %"PRIsVALUE"::%"PRIsVALUE" not defined", @@ -2234,13 +2234,13 @@ set_const_visibility(VALUE mod, int argc, VALUE *argv, rb_const_flag_t flag) } else { if (i > 0) { - rb_clear_cache(); + rb_clear_constant_cache(); } rb_name_error(id, "constant %"PRIsVALUE"::%"PRIsVALUE" not defined", rb_class_name(mod), QUOTE_ID(id)); } } - rb_clear_cache(); + rb_clear_constant_cache(); } /* |