Skip to content

Ruby - Change the exit code to 130 - #303

Merged
olaservo merged 2 commits into
mainfrom
fix/ruby-ctrl-c-exit-130
Nov 17, 2026
Merged

olaservo merged 2 commits into
mainfrom
fix/ruby-ctrl-c-exit-130

Conversation

@a-akimov

Copy link
Copy Markdown
Contributor

Motivation and Context

Follow-up to #302, as suggested in #301: after Ctrl-C the Ruby client exited with status 0, while the other four clients exit 130. It now exits 130 too. ensure still runs, so the server is still shut down.

Closes #301

How Has This Been Tested?

Locally with Ruby 4.0.

Breaking Changes

N/a

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Assisted by Claude Opus 5.5

Copilot AI balanced review requested due to automatic review settings November 16, 2026 17:17
@a-akimov
a-akimov requested a review from a team November 16, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Ctrl-C regression test does not assert Ruby’s exit status of 130, allowing a regression to status 0 to pass, and the README still documents that the status is unchecked.

1 open issue
What changed in this PR

Aligns the Ruby MCP client’s Ctrl-C exit status with the other four clients, completing the follow-up to #302 and #301.

Changes:

  • Exits with status 130 when handling Interrupt.
  • Preserves backtrace suppression and the existing ensure cleanup path.
File Description
mcp-client-ruby/​client.rb Adds exit 130 to the Ctrl-C handler.

Review effort: Balanced

Comment thread mcp-client-ruby/client.rb Resolved
Copilot AI balanced review requested due to automatic review settings November 16, 2026 19:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the Ruby Ctrl-C exit-status update.

1 open issue

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the Ruby Ctrl-C exit-status change and its shared test and documentation updates.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@olaservo olaservo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for picking up the follow-up. exit 130 raises SystemExit, so the ensure cleanup still runs, and Ruby now matches the other four clients. Checking for a non-zero status in the Ctrl-C test is a reasonable choice given that uv run reports a SIGINT death as 2, and it does catch a return to status 0. CI is green. Merging.


Generated by Claude Code

@olaservo
olaservo merged commit abb2533 into main Nov 17, 2026
13 checks passed
@olaservo
olaservo deleted the fix/ruby-ctrl-c-exit-130 branch November 17, 2026 05:42
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.

Make Ctrl-C behave the same way in all five clients

3 participants