groups()
public
Show source
static VALUE
proc_getgroups(VALUE obj)
{
VALUE ary;
size_t ngroups;
rb_gid_t *groups;
int i;
groups = ALLOCA_N(rb_gid_t, maxgroups);
ngroups = getgroups(maxgroups, groups);
if (ngroups == -1)
rb_sys_fail(0);
ary = rb_ary_new();
for (i = 0; i < ngroups; i++)
rb_ary_push(ary, GIDT2NUM(groups[i]));
return ary;
rb_notimplement();
return Qnil;
}