From: "usa (Usaku NAKAMURA)" Date: 2021-11-24T10:35:02+00:00 Subject: [ruby-core:106260] [Ruby master Bug#18173] The feature in `$LOADED_FEATURES` is loaded again Issue #18173 has been updated by usa (Usaku NAKAMURA). Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE to 2.6: REQUIRED, 2.7: DONE, 3.0: DONE ruby_2_7 61a02168f7ba353a2838f2783f291a816d7e0c90 merged revision(s) ddb32e66160ab50849419ef7c7ac584913b79c34. ---------------------------------------- Bug #18173: The feature in `$LOADED_FEATURES` is loaded again https://bugs.ruby-lang.org/issues/18173#change-94880 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Backport: 2.6: REQUIRED, 2.7: DONE, 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: