From: "nagachika (Tomoyuki Chikanaga)" Date: 2021-10-03T07:33:26+00:00 Subject: [ruby-core:105526] [Ruby master Bug#18173] The feature in `$LOADED_FEATURES` is loaded again Issue #18173 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE ruby_3_0 5341eca588e738cd5031ab7d8bb5c300471c00e9 merged revision(s) ddb32e66160ab50849419ef7c7ac584913b79c34. ---------------------------------------- Bug #18173: The feature in `$LOADED_FEATURES` is loaded again https://bugs.ruby-lang.org/issues/18173#change-93978 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Backport: 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE ---------------------------------------- In general, the feature name registered in `$LOADED_FEATURES` (e.g. "enumerator.so", "thread.rb", and so on) is expected not to be loaded again. But, as @ko1 reported, when a feature name is added to the variable during another file is required, it will be loaded again. ```shell $ echo 'raise __FILE__' > target.rb $ echo '$" << "target.rb"' > provide.rb $ ruby -r./provide.rb target.rb target.rb:1:in `
': target.rb (RuntimeError) ``` -- https://bugs.ruby-lang.org/ Unsubscribe: