End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Array#empty?
array.empty? → true or false
array.c
View on GitHub ↗
static VALUE
rb_ary_empty_p(VALUE ary)
{
return RBOOL(RARRAY_LEN(ary) == 0);
}
Returns true if the count of elements in self is zero, false otherwise.