Project

General

Profile

Actions

Feature #11140

closed

Allow rubygems' `require` to handle `autoload` calls

Added by tenderlovemaking (Aaron Patterson) over 9 years ago. Updated over 5 years ago.

Status:
Closed
Target version:
-
[ruby-core:69132]

Description

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:

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) call_send_on_autoload.diff tenderlovemaking (Aaron Patterson), 05/12/2015 12:24 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0