Issue #15777 has been updated by byroot (Jean Boussier).


> Is it necessary to export rb_autoload_at_p?
> Do you have the plan to use it in extension libraries?

No I have no such plan. I did so because it's defined in `variable.c` but called from `load.c` so without that declaration it won't compile:

```
load.c:1180:12: error: implicit declaration of function 'rb_autoload_at_p' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    return rb_autoload_at_p(mod, id, recur);
```

I'm quite a MRI & C beginner though, so if there is a better way to do it I'll gladly change it.

>  return nil if not recur in that loop.

Done.


----------------------------------------
Feature #15777: autoload?(cname, inherit=true)
https://bugs.ruby-lang.org/issues/15777#change-78756

* Author: fxn (Xavier Noria)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
Zeitwerk needs to be able to check if a given class or module has an autoload defined for a certain constant name, that would be `autoload?(cname, false)`, similar to `const_defined?(cname, false)`.




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>