JRuby: how to call a Java variadic function without optional arguments

Posted by Vincent Robert on Stack Overflow See other posts from Stack Overflow or by Vincent Robert
Published on 2010-04-14T10:57:25Z Indexed on 2010/04/27 14:53 UTC
Read the original article Hit count: 283

I have a function with a signature similar to String.format(String, Object...).

I want to call this function from JRuby without the last parameters (since it is optional), but my code throws an ArgumentError (wrong # of arguments(1 for 2))

Is there a way to call this function with only 1 argument just like I would do in Java?

© Stack Overflow or respective owner

Related posts about jruby

Related posts about variadic-functions