Skip to content

Remove useless condition in example#339

Merged
koic merged 1 commit intomodelcontextprotocol:mainfrom
koic:remove_useless_condition_in_examples
May 9, 2026
Merged

Remove useless condition in example#339
koic merged 1 commit intomodelcontextprotocol:mainfrom
koic:remove_useless_condition_in_examples

Conversation

@koic
Copy link
Copy Markdown
Member

@koic koic commented May 8, 2026

Motivation and Context

The example files examples/http_client.rb and examples/streamable_http_client.rb are intended to be run as standalone scripts and are not designed to be reused as modules (e.g., via require). The if __FILE__ == $PROGRAM_NAME guard therefore serves no purpose and is removed.

How Has This Been Tested?

Manually verified that each example script can still be executed directly (ruby examples/http_client.rb, ruby examples/streamable_http_client.rb). No automated tests cover files under examples/.

Breaking Changes

None. The files under examples/ are standalone scripts and are not part of the gem's public API.

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

## Motivation and Context

The example files `examples/http_client.rb` and `examples/streamable_http_client.rb` are
intended to be run as standalone scripts and are not designed to be reused as modules (e.g., via `require`).
The `if __FILE__ == $PROGRAM_NAME` guard therefore serves no purpose and is removed.

## How Has This Been Tested?

Manually verified that each example script can still be executed directly
(`ruby examples/http_client.rb`, `ruby examples/streamable_http_client.rb`).
No automated tests cover files under `examples/`.

## Breaking Changes

None. The files under `examples/` are standalone scripts and are not part of the gem's public API.
@koic koic merged commit 811c56a into modelcontextprotocol:main May 9, 2026
11 checks passed
@koic koic deleted the remove_useless_condition_in_examples branch May 9, 2026 03:25
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