delete_at(p1)
public
Deletes the element at the specified index,
returning that element, or nil if the index is out of range. See also Array#slice!.
a = %w( ant bat cat dog )
a.delete_at(2)
a
a.delete_at(99)
Show source
/*
* call-seq:
* array.delete_at(index) -> obj or nil
*
* Deletes the element at the specified index, returning that element,
* or <code>nil</code> if the index is out of range. See also
* <code>Array
*
* a = %w( ant bat cat dog )
* a.delete_at(2)
* a
* a.delete_at(99)
*/
static VALUE
rb_ary_delete_at_m(ary, pos)
VALUE ary, pos;
{
return rb_ary_delete_at(ary, NUM2LONG(pos));
}