Skip to content

Forward legacy options from String extension - #35

Open
OskarEichler wants to merge 2 commits into
janlelis:mainfrom
OskarEichler:codex/forward-string-legacy-options
Open

OskarEichler wants to merge 2 commits into
janlelis:mainfrom
OskarEichler:codex/forward-string-legacy-options

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

String#display_width currently replaces its supplied legacy options hash with a fresh empty hash before delegating, so the compatibility argument is silently ignored. Forward the received value unchanged.

Verified with the full 67-example suite and a focused legacy-options model on Ruby 4.0.6 and 3.2.11.

@janlelis

janlelis commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Can you please add a test-case illustrating the option passing bug + fix?

@OskarEichler

Copy link
Copy Markdown
Contributor Author

Added the requested regression in 0f7cedc: a positional legacy ambiguous-width option reaches String#display_width, and mixed positional/keyword options preserve the existing .of precedence. Full suite: 68 examples, zero failures on Ruby 4.0.6; git diff --check passes.

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