From: "usa (Usaku NAKAMURA)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:106260] [Ruby master Bug#18173] The feature in `$LOADED_FEATURES` is loaded again
Date: Wed, 24 Nov 2021 10:35:02 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-94880.20211124103502.4@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-18173.20210916094724.4@ruby-lang.org
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 `<main>': target.rb (RuntimeError)
```
--
https://bugs.ruby-lang.org/
prev parent reply other threads:[~2021-11-24 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 9:47 [ruby-core:105294] [Ruby master Bug#18173] The feature in `$LOADED_FEATURES` is loaded again nobu (Nobuyoshi Nakada)
2021-10-03 7:33 ` [ruby-core:105526] " nagachika (Tomoyuki Chikanaga)
2021-11-24 10:35 ` usa (Usaku NAKAMURA) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-94880.20211124103502.4@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).