summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2022-08-25 13:47:47 +0900
committerNobuyoshi Nakada <[email protected]>2022-11-25 16:11:17 +0900
commit64c8ed272fea57e0825650f75e05eb44456a039a ()
treea158f60c41fe46af8b38718bbd2a11e97646d23a /enumerator.c
parentffc6c5d056e0f18a9bdfb9b1477d0192a6d37ea3 (diff)
`remain` no longer starts with 0
Notes: Merged: https://.com/ruby/ruby/pull/6809
-rw-r--r--enumerator.c9
1 files changed, 2 insertions, 7 deletions
@@ -2447,13 +2447,8 @@ lazy_take_proc(VALUE proc_entry, struct MEMO *result, VALUE memos, long memo_ind
}
remain = NUM2LONG(memo);
- if (remain == 0) {
- LAZY_MEMO_SET_BREAK(result);
- }
- else {
- if (--remain == 0) LAZY_MEMO_SET_BREAK(result);
- rb_ary_store(memos, memo_index, LONG2NUM(remain));
- }
return result;
}