mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
remain
no longer starts with 0
This commit is contained in:
parent
ffc6c5d056
commit
64c8ed272f
Notes:
git
2022-11-25 07:11:40 +00:00
1 changed files with 2 additions and 7 deletions
|
@ -2447,13 +2447,8 @@ lazy_take_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_ind
|
||||||
}
|
}
|
||||||
|
|
||||||
remain = NUM2LONG(memo);
|
remain = NUM2LONG(memo);
|
||||||
if (remain == 0) {
|
if (--remain == 0) LAZY_MEMO_SET_BREAK(result);
|
||||||
LAZY_MEMO_SET_BREAK(result);
|
rb_ary_store(memos, memo_index, LONG2NUM(remain));
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (--remain == 0) LAZY_MEMO_SET_BREAK(result);
|
|
||||||
rb_ary_store(memos, memo_index, LONG2NUM(remain));
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue