From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:69209] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
Date: Sat, 16 May 2015 00:12:07 +0000 [thread overview]
Message-ID: <redmine.journal-52463.20150516001206.af346aad3adddb8f@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11140.20150512002423@ruby-lang.org
Issue #11140 has been updated by Nobuyoshi Nakada.
Removed that garbage.
----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52463
* Author: Aaron Patterson
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.
For example:
~~~ruby
class A
autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~
The above code won't work because 'a/b' is in a different gem. I'd like to give rubygems the opportunity to handle requires made through `autoload`.
I've attached a patch that makes the change.
---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)
--
https://bugs.ruby-lang.org/
next prev parent reply other threads:[~2015-05-15 23:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
2015-05-12 0:24 ` [ruby-core:69132] [Ruby trunk - Feature #11140] [Open] Allow rubygems' `require` to handle `autoload` calls tenderlove
2015-05-12 0:46 ` [ruby-core:69135] [Ruby trunk - Feature #11140] " merch-redmine
2015-05-12 3:11 ` [ruby-core:69139] " nobu
2015-05-14 7:29 ` [ruby-core:69188] " matz
2015-05-15 6:43 ` [ruby-core:69202] [Ruby trunk - Feature #11140] [Assigned] " usa
2015-05-15 19:05 ` [ruby-core:69205] [Ruby trunk - Feature #11140] " tenderlove
2015-05-16 0:12 ` nobu [this message]
2015-05-18 8:50 ` [ruby-core:69221] " nobu
2015-06-12 15:09 ` [ruby-core:69553] " usa
2019-01-10 0:26 ` [ruby-core:90959] [Ruby trunk Feature#11140] " tenderlove
2019-03-23 7:48 ` [ruby-core:91954] " hsbt
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-52463.20150516001206.af346aad3adddb8f@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).