End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
NilClass#to_c
nil.to_c → (0+0i)
complex.c
View on GitHub ↗
static VALUE
nilclass_to_c(VALUE self)
{
return rb_complex_new1(INT2FIX(0));
}
Returns zero as a complex.