We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bd2bd4 commit 29ae9bcCopy full SHA for 29ae9bc
1 file changed
src/main/java/org/jruby/ext/openssl/X509Cert.java
@@ -409,17 +409,14 @@ public IRubyObject serial() {
409
410
@JRubyMethod(name = "serial=")
411
public IRubyObject set_serial(final IRubyObject serial) {
412
- if ( ! serial.equals(this.serial) ) {
413
- this.changed = true;
414
- }
415
-
416
- final String serialStr = serial.toString();
+ final String serialStr = serial.asString().toString();
417
final BigInteger serialInt;
418
if ( serialStr.equals("0") ) { // MRI compatibility: allow 0 serial number
419
serialInt = BigInteger.ONE;
420
} else {
421
serialInt = new BigInteger(serialStr);
422
}
+ this.changed = ! serialInt.equals(this.serial);
423
//generator.setSerialNumber( serialInt.abs() );
424
this.serial = serialInt; return serial;
425
0 commit comments