at(p1)
public
Returns the element at index. A negative index counts from the end of self.
Returns nil if the index is out of
range. See also Array#[].
a = [ "a", "b", "c", "d", "e" ]
a.at(0)
a.at(-1)
Show source
static VALUE
rb_ary_at(VALUE ary, VALUE pos)
{
return rb_ary_entry(ary, NUM2LONG(pos));
}