Bug #1198 » with_index-incompat.patch
src/ruby/trunk/enumerator.c (working copy) | ||
---|---|---|
}
|
||
static VALUE
|
||
enumerator_with_index_i(VALUE val, VALUE *memo)
|
||
enumerator_with_index_i(VALUE val, VALUE *memo, int argc, VALUE *argv)
|
||
{
|
||
val = rb_yield_values(2, val, INT2FIX(*memo));
|
||
VALUE ary;
|
||
ary = rb_ary_push(rb_ary_new4(argc, argv), INT2FIX(*memo));
|
||
++*memo;
|
||
return val;
|
||
return rb_yield_values2(RARRAY_LEN(ary), RARRAY_PTR(ary));
|
||
}
|
||
/*
|
- « Previous
- 1
- 2
- Next »