Skip to content

RUBY-3981 Fix Lint/NextWithoutAccumulator violations - #3113

Merged
jamis merged 1 commit into
mongodb:masterfrom
jamis:3981-next-without-accumulator
Oct 15, 2026
Merged

jamis merged 1 commit into
mongodb:masterfrom
jamis:3981-next-without-accumulator

Conversation

@jamis

@jamis jamis commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Cleans up Lint/NextWithoutAccumulator by passing the accumulator to next in the reduce blocks of Operation::Result::Aggregatable, then removes the cop from .rubocop_todo.yml.

While in there I noticed that write_concern_error on line 66 is not defined anywhere, so I switched it to the block variable wce.

Pass the accumulator to next in the reduce blocks of Operation::Result::Aggregatable, then remove the cop's exclusion from .rubocop_todo.yml.

Also fix a typo in aggregate_write_concern_errors: write_concern_error is not defined; use the block variable wce.
@jamis
jamis requested a review from a team as a code owner October 14, 2026 16:56
@jamis
jamis requested a review from comandeo-mongo October 14, 2026 16:56
@jamis
jamis merged commit d2b3998 into mongodb:master Oct 15, 2026
241 checks passed
@jamis
jamis deleted the 3981-next-without-accumulator branch October 15, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants