Skip to content

Commit

Permalink
[refactor] set @unused_bits variable directly
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed May 5, 2024
1 parent 8007fc1 commit 510350e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jruby/ext/openssl/ASN1.java
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ static IRubyObject decodeObject(final ThreadContext context,
final ASN1BitString derObj = (ASN1BitString) obj;
RubyString str = runtime.newString( new ByteList(derObj.getBytes(), false) );
IRubyObject bitString = ASN1.getClass("BitString").newInstance(context, str, Block.NULL_BLOCK);
bitString.callMethod(context, "unused_bits=", runtime.newFixnum( derObj.getPadBits() ));
bitString.getInstanceVariables().setInstanceVariable("@unused_bits", runtime.newFixnum(derObj.getPadBits()));
return bitString;
}
if ( obj instanceof ASN1String ) {
Expand Down

0 comments on commit 510350e

Please sign in to comment.