Skip to content

Call Kernel.format explicitly in Gem::Deprecate wrapper#9714

Merged
hsbt merged 1 commit into
masterfrom
claude/rubygems-issue-9704-892260
Jul 23, 2026
Merged

Call Kernel.format explicitly in Gem::Deprecate wrapper#9714
hsbt merged 1 commit into
masterfrom
claude/rubygems-issue-9704-892260

Conversation

@hsbt

@hsbt hsbt commented Jul 22, 2026

Copy link
Copy Markdown
Member

The wrapper defined by Gem::Deprecate#deprecate runs in the instance context of the deprecating class, so the bare format call introduced in 132a565 dispatches to the class's own #format method when it defines one and raises ArgumentError. Calling Kernel.format explicitly restores the previous behavior.

Fixes #9704

🤖 Generated with Claude Code

The wrapper method runs in the context of the deprecating class, so a
bare format call dispatches to that class's own #format method when it
defines one, raising ArgumentError.

#9704

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hsbt
hsbt merged commit e920104 into master Jul 23, 2026
107 checks passed
@hsbt
hsbt deleted the claude/rubygems-issue-9704-892260 branch July 23, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gem::Deprecate#deprecate fails when enclosing class implements format

2 participants