End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::BN#==
bn == obj => true or false
ext/openssl/ossl_bn.c
View on GitHub ↗
static VALUE
ossl_bn_eq(VALUE self, VALUE other)
{
BIGNUM *bn1, *bn2;
GetBN(self, bn1);
other = try_convert_to_bn(other);
if (NIL_P(other))
return Qfalse;
GetBN(other, bn2);
if (!BN_cmp(bn1, bn2)) {
return Qtrue;
}
return Qfalse;
}
Returns true only if obj has the same value as bn. Contrast this with OpenSSL::BN#eql?, which requires obj to be OpenSSL::BN.