Skip to content

Commit 09c0670

Browse files
committed
Attempt to fix [Backport #21567]
1 parent 21709a5 commit 09c0670

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

load.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,8 @@ get_loaded_features_index(rb_vm_t *vm)
410410
features_index_add(vm, as_str, INT2FIX(i));
411411
}
412412
/* The user modified $LOADED_FEATURES, so we should restore the changes. */
413-
if (!rb_ary_shared_with_p(features, CURRENT_NS_LOADED_FEATURES(vm_ns))) {
414-
rb_ary_replace(CURRENT_NS_LOADED_FEATURES(vm_ns), features);
413+
if (!rb_ary_shared_with_p(features, vm->loaded_features)) {
414+
rb_ary_replace(vm->loaded_features, features);
415415
}
416416
reset_loaded_features_snapshot(vm);
417417

0 commit comments

Comments
 (0)