fix: remove the duplicated instance-name helpers - #168
Merged
Conversation
`max_server_name_length`, `longest_disk_name`, `longest_disk_name_suffix`, `fallback_server_name` and `fallback_server_name_length` are each defined twice, byte for byte. #162 added them and #163 added them again, and neither merge noticed. Ruby lets the later definition win silently, so nothing misbehaves and the suite stays green -- but `rake` does not, because RuboCop flags all five as Lint/DuplicateMethods, and main has been red since #163 landed. Delete the second copy. Pure deletion, no behaviour change: 326 examples, 0 failures, no offenses.
tas50
force-pushed
the
fix/remove-duplicated-name-helpers
branch
from
August 23, 2026 18:52
7f9716b to
8af31f3
Compare
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.
The problem
mainis red onbundle exec rake:Five private helpers are defined twice, byte for byte, comments included.
#162 introduced them and #163 introduced them again; neither merge dropped
the duplicate.
Ruby resolves this by letting the second definition win, so behaviour is
correct and the spec suite has stayed green throughout — which is why it
went unnoticed. Only RuboCop sees it.
The fix
Delete the second copy. This is a pure deletion —
git diffadds no lines:Verification
bundle exec rake— 330 examples, 0 failures; 18 files inspected, no offenses.definitions are the ones that were already in effect at runtime.