length()
public
Returns the number of elements in self. May be zero.
[ 1, 2, 3, 4, 5 ].length
Show source
/*
* call-seq:
* array.length -> int
*
* Returns the number of elements in <i>self</i>. May be zero.
*
* [ 1, 2, 3, 4, 5 ].length
*/
static VALUE
rb_ary_length(ary)
VALUE ary;
{
return LONG2NUM(RARRAY(ary)->len);
}