Created
August 20, 2013 10:05
-
-
Save mkristian/6279638 to your computer and use it in GitHub Desktop.
calling overloaded method from jruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class C { | |
public void m( String[] args, Object f ) { | |
System.out.println( "asd" ); | |
} | |
public void m( String[] args ) { | |
System.out.println( args.length ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main)> C.new.m ['a'].to_java, 'a'.to_java | |
NameError: no method 'm' for arguments (org.jruby.java.proxies.ArrayJavaProxy,java.lang.String) on Java::Default::C | |
from (irb):12:in `evaluate' | |
from org/jruby/RubyKernel.java:1093:in `eval' | |
from org/jruby/RubyKernel.java:1489:in `loop' | |
from org/jruby/RubyKernel.java:1254:in `catch' | |
from org/jruby/RubyKernel.java:1254:in `catch' | |
from /home/christian/install/jruby/bin/jirb:13:in `(root)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment