Ruby Newbie homepage Ruby Newbie homepage

How to use

Quick guide

Official content
Returns the element at Integer offset index; does not modify self.
a = [:foo, 'bar', 2]
a.at(0) # => :foo
a.at(2) # => 2
 
               VALUE
rb_ary_at(VALUE ary, VALUE pos)
{
    return rb_ary_entry(ary, NUM2LONG(pos));
}
            

Was this page useful?