-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment Information
jruby 9.3.0.0-SNAPSHOT (2.6.8) 2021-09-08 1420b569ca OpenJDK 64-Bit Server VM 11.0.11+9-Ubuntu-0ubuntu2.20.04 on 11.0.11+9-Ubuntu-0ubuntu2.20.04 +jit [linux-x86_64]
Expected Behavior
Test.java
public class Test {
public static void func(int... args) {
for (int a : args) {
System.out.println(a);
}
}
}# jruby -e 'java_import "Test"; Test.func(1)'
1
Actual Behavior
# jruby -e 'java_import "Test"; Test.func(1)'
Unhandled Java exception: java.lang.ClassCastException: class [I cannot be cast to class [Ljava.lang.Object; ([I and [Ljava.lang.Object; are in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class [I cannot be cast to class [Ljava.lang.Object; ([I and [Ljava.lang.Object; are in module java.base of loader 'bootstrap')
convertVarArgumentsOnly at org/jruby/java/invokers/RubyToJavaInvoker.java:320
convertArguments at org/jruby/java/invokers/RubyToJavaInvoker.java:272
convertArguments at org/jruby/java/invokers/RubyToJavaInvoker.java:259
call at org/jruby/java/invokers/StaticMethodInvoker.java:23
call at org/jruby/java/invokers/StaticMethodInvoker.java:36
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:372
call at org/jruby/runtime/callsite/CachingCallSite.java:175
invokeOther1:func at -e:1
<main> at -e:1
run at -e:-1
invokeWithArguments at java/lang/invoke/MethodHandle.java:710
load at org/jruby/ir/Compiler.java:114
runScript at org/jruby/Ruby.java:1259
runNormally at org/jruby/Ruby.java:1178
runNormally at org/jruby/Ruby.java:1160
runNormally at org/jruby/Ruby.java:1196
runFromMain at org/jruby/Ruby.java:979
doRunFromMain at org/jruby/Main.java:393
internalRun at org/jruby/Main.java:287
run at org/jruby/Main.java:234
main at org/jruby/Main.java:206
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels