Skip to content

Commit

Permalink
Do initialize classes during java_import
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jun 24, 2024
1 parent e9d5642 commit c28017c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/javasupport/ext/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private static IRubyObject javaImport(ThreadContext context, RubyModule target,
if (className.contains("::")) {
throw runtime.newArgumentError("must use Java style name: " + className);
}
javaClass = Java.getJavaClass(runtime, className, false); // raises NameError if not found
javaClass = Java.getJavaClass(runtime, className, true); // raises NameError if not found
} else if (klass instanceof JavaPackage) {
throw runtime.newArgumentError("java_import does not work for Java packages (try include_package instead)");
} else if (klass instanceof RubyModule) {
Expand Down

0 comments on commit c28017c

Please sign in to comment.