entries()
public
Returns an array containing the items in enum.
(1..7).to_a
{ 'a'=>1, 'b'=>2, 'c'=>3 }.to_a
Show source
/*
* call-seq:
* enum.to_a => array
* enum.entries => array
*
* Returns an array containing the items in <i>enum</i>.
*
* (1..7).to_a
* { 'a'=>1, 'b'=>2, 'c'=>3 }.to_a
*/
static VALUE
enum_to_a(obj)
VALUE obj;
{
VALUE ary = rb_ary_new();
rb_iterate(rb_each, obj, collect_all, ary);
return ary;
}