Skip to content

Correct ttyname documentation - #154

Merged
nobu merged 1 commit into
ruby:masterfrom
OskarEichler:codex/ttyname-doc
Sep 2, 2026
Merged

nobu merged 1 commit into
ruby:masterfrom
OskarEichler:codex/ttyname-doc

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary

Correct the reversed IO#ttyname documentation: it returns the terminal name when the IO is a tty and nil otherwise.

Reproduction

The implementation first returns nil when isatty(fd) is false, which is the opposite of the current sentence.

Verification

  • RDoc builds with 100% documented coverage
  • release/cumulative candidate: 36 tests / 143 assertions
  • current upstream: 35 tests / 144 assertions

Compatibility

Documentation-only; no runtime or public API change. Prepared with AI-assisted source review; no repository tests were changed.

@nobu nobu added the documentation Improvements to documentation. label Sep 2, 2026
@nobu
nobu merged commit 7ad5f44 into ruby:master Sep 2, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants