googleapis / googleapis/google-api-ruby-client
google-apis-core: singular PagedResults ignores max
- Dominant language
- Ruby
- Stars
- 2.9k
- Forks
- 888
- Avg merge
- 6m
- Merged PRs (30d)
- 218
Description
`Google::Apis::Core::PagedResults#fetch_all` does not increment `item_count` in the singular-result branch. A sequence of singular pages therefore ignores `max` and yields every item.
A three-page model with `max: 2` currently yields all 3. Incrementing after the singular yield makes it stop after the first 2, matching the collection branch and documented limit.
The focused candidate passes 98 targeted examples and the cumulative 509-example core suite on Ruby 4.0.6. I found no open issue/PR overlap. I have a minimal patch ready and can submit it after maintainer acceptance per CONTRIBUTING. The source audit and candidate preparation used AI assistance; I reviewed and verified the result.
Contributor guide
Assessment
This issue has not been assessed yet.