Fix Lint/DuplicateMethods in StringIO_test.rb#3010
Merged
Conversation
PR #3002 added test_pread, test_read_nonblock and test_sysread that duplicate the existing methods of the same name, breaking rubocop on master. Merge the nil output buffer assertions into the existing methods and drop the duplicate definitions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9NBHdAQGQbyDV7M8MiTLF
Collaborator
|
🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
master's CI ("Ruby" job) is failing on RuboCop with
Lint/DuplicateMethods:Cause
This is a merge skew (semantic conflict) between two PRs that were each green on their own:
test_pread/test_read_nonblock/test_sysread(the full-argument variants) were already on master via commit4de713c("Add stdlib signature tests for Correct core/stdlib signatures to match Ruby 4.0 #2967").niloutput buffer variants) in commit1914368.#3002's branch last synced master at a point that did not yet contain
4de713c, so RuboCop saw no duplicate when #3002's CI ran. The duplicate only materialized once #3002 was merged into the current master, and CI is not re-run against the post-merge state.Fix
Merge the
niloutput buffer assertions into the existing methods and drop the duplicate definitions. No test coverage is lost.ruby -c: Syntax OK🤖 Generated with Claude Code
Generated by Claude Code