End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::X509::Name#cmp
name.cmp(other) → -1 | 0 | 1 | nil
ext/openssl/ossl_x509name.c
View on GitHub ↗
static VALUE
ossl_x509name_cmp(VALUE self, VALUE other)
{
int result;
if (!rb_obj_is_kind_of(other, cX509Name))
return Qnil;
result = ossl_x509name_cmp0(self, other);
if (result < 0) return INT2FIX(-1);
if (result > 0) return INT2FIX(1);
return INT2FIX(0);
}
Compares this Name with other and returns 0 if they are the same and -1 or +1 if they are greater or less than each other respectively. Returns nil if they are not comparable (i.e. different types).