class method
Set.[]
[X] (*X) -> ::Set[X]
Set[*objects] → new_set
set.c
View on GitHub ↗
static VALUE
set_s_create(int argc, VALUE *argv, VALUE klass)
{
VALUE set = set_alloc_with_size(klass, argc);
set_table *table = RSET_TABLE(set);
int i;
for (i=0; i < argc; i++) {
set_table_insert_wb(table, set, argv[i], NULL);
}
return set;
}
Returns a new Set object populated with the given objects, See Set::new.