End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
NilClass#to_a
nil.to_a → []
object.c
View on GitHub ↗
static VALUE
nil_to_a(VALUE obj)
{
return rb_ary_new2(0);
}
Always returns an empty array.
Example
nil.to_a #=> []