Fix the missed vm_ns during rebase to follow the change b227a942b205c89fdb5adc85acdf029b9b83faf1

This commit is contained in:
Satoshi Tagomori 2025-09-20 14:44:35 +09:00 committed by Satoshi Tagomori
parent f58f7f25a3
commit 4644d14990

4
load.c
View File

@ -390,10 +390,10 @@ get_loaded_features_index(const rb_namespace_t *ns)
features_index_add(ns, as_str, INT2FIX(i));
}
/* The user modified $LOADED_FEATURES, so we should restore the changes. */
if (!rb_ary_shared_with_p(features, CURRENT_NS_LOADED_FEATURES(vm_ns))) {
if (!rb_ary_shared_with_p(features, ns->loaded_features)) {
rb_ary_replace(ns->loaded_features, features);
}
reset_loaded_features_snapshot(vm_ns);
reset_loaded_features_snapshot(ns);
features = ns->loaded_features_snapshot;
long j = RARRAY_LEN(features);