Skip to content

Commit

Permalink
OpenSSL::PKey.read has one required, one optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Oct 5, 2012
1 parent bcddb37 commit d516385
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/org/jruby/ext/openssl/PKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d516385

Please sign in to comment.