End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
SystemCallError.===
system_call_error === other → true or false
error.c
View on GitHub ↗
static VALUE
syserr_eqq(VALUE self, VALUE exc)
{
VALUE num, e;
if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) {
if (!rb_respond_to(exc, id_errno)) return Qfalse;
}
else if (self == rb_eSystemCallError) return Qtrue;
num = rb_attr_get(exc, id_errno);
if (NIL_P(num)) {
num = rb_funcallv(exc, id_errno, 0, 0);
}
e = rb_const_get(self, id_Errno);
if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
return Qtrue;
return Qfalse;
}
Return true if the receiver is a generic SystemCallError, or if the error numbers self and other are the same.