Make sure to only reset "dummy" $LOADED_FEATURES
Namely, those generated under /tmp.
/tmp
The previous approach was brittle and broken in the case of ruby-core, because under that setup, the current folder is in the original $LOAD_PATH, and dummy features are created under ./tmp, so they were failing to be reset.
$LOAD_PATH
./tmp
Make sure to only reset "dummy" $LOADED_FEATURES
Namely, those generated under
/tmp.The previous approach was brittle and broken in the case of ruby-core,
because under that setup, the current folder is in the original
$LOAD_PATH, and dummy features are created under./tmp, so they werefailing to be reset.