Permalink
Browse files

OpenSSL::PKey.read has one required, one optional.

  • Loading branch information...
1 parent bcddb37 commit d516385b07b158b7f1bb6f836464d45ba50a8f68 @headius headius committed Oct 5, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/org/jruby/ext/openssl/PKey.java
@@ -86,13 +86,12 @@ public static RaiseException newPKeyError(Ruby runtime, String message) {
public static class PKeyModule {
- @JRubyMethod(name = "read", meta = true, optional = 1)
+ @JRubyMethod(name = "read", meta = true, required = 1, optional = 1)
public static IRubyObject read(ThreadContext ctx, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = ctx.runtime;
IRubyObject data;
char[] pass;
- int argc = Arity.checkArgumentCount(runtime, args, 1, 2);
- switch (argc) {
+ switch (args.length) {
case 1:
data = args[0];
pass = null;

0 comments on commit d516385

Please sign in to comment.