Method: List#map!

Defined in:
ext/list/list.c

#map!Object



1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
# File 'ext/list/list.c', line 1489

static VALUE
list_collect_bang(VALUE self)
{
  list_t *ptr;
  item_t *c;

  RETURN_SIZED_ENUMERATOR(self, 0, 0, list_enum_length);
  Data_Get_Struct(self, list_t, ptr);
  LIST_FOR(ptr, c) {
    c->value = rb_yield(c->value);
  }
  return self;
}