Permalink
Browse files

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

…ling internal require
  • Loading branch information...
1 parent b37a0bd commit a311d53e8ceccd348eaa0359098df6a8ea69e590 @ashanbrown ashanbrown committed Sep 3, 2012
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);
}
}

0 comments on commit a311d53

Please sign in to comment.