Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

call Kernel.require ruby method from autoload callback instead of cal…

…ling internal require
  • Loading branch information...
commit a311d53e8ceccd348eaa0359098df6a8ea69e590 1 parent b37a0bd
@ashanbrown authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/org/jruby/RubyKernel.java
View
5 src/org/jruby/RubyKernel.java
@@ -208,8 +208,9 @@ public String file() {
}
public void load(Ruby runtime) {
- if (runtime.getLoadService().autoloadRequire(file())) {
- // Do not finish autoloading by cyclic autoload
+ final ThreadContext context = runtime.getCurrentContext();
+ if (runtime.getKernel().callMethod(context, "require", file).isTrue()) {
+ // Do not finish autoloading by cyclic autoload
module.finishAutoload(baseName);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.