Skip to content

Commit

Permalink
Fix mismatched blocks in s_hexdigest
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Jan 4, 2024
1 parent 14120e2 commit 1eb6d5f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/main/java/org/jruby/ext/digest/RubyDigest.java
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public static IRubyObject s_digest(ThreadContext context, IRubyObject recv, IRub
}

@JRubyMethod(name = "hexdigest", required = 1, optional = 1, checkArity = false, meta = true)
public static IRubyObject s_hexdigest(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
public static IRubyObject s_hexdigest(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = recv.getRuntime();
byte[] digest = recv.callMethod(context, "digest", args, Block.NULL_BLOCK).convertToString().getBytes();
return RubyDigest.toHexString(runtime, digest);
Expand Down Expand Up @@ -496,6 +496,11 @@ public static RubyString bubblebabble(ThreadContext context, IRubyObject recv, I
public static RubyString bubblebabble(IRubyObject recv, IRubyObject arg) {
return bubblebabble(recv.getRuntime().getCurrentContext(), recv, arg);
}

@Deprecated
public static IRubyObject s_hexdigest(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {
return s_hexdigest(context, recv, args);
}
}


Expand Down

0 comments on commit 1eb6d5f

Please sign in to comment.