diff options
author | Jeremy Evans <code@jeremyevans.net> | 2021-05-27 13:29:24 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2021-05-27 14:17:32 -0700 |
commit | fd8991f797c145615820b4c76e6b7ac5a71339ea (patch) | |
tree | 7906cbb1c358e6aef9d260eb962e06389992e16c /enumerator.c | |
parent | 029169bc5b45d8ec783c19eaf713395b7983d16a (diff) |
Fix lazy enumerator with index size
Fixes [Bug #17889]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4534
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c index 3ea4330802..fac83b4360 100644 --- a/enumerator.c +++ b/enumerator.c @@ -2700,8 +2700,13 @@ lazy_with_index_proc(VALUE proc_entry, struct MEMO* result, VALUE memos, long me return result; } +static VALUE +lazy_with_index_size(VALUE proc, VALUE receiver) { + return receiver; +} + static const lazyenum_funcs lazy_with_index_funcs = { - lazy_with_index_proc, 0, + lazy_with_index_proc, lazy_with_index_size, }; /* |