Skip to content

Return nil when JRuby has no console device - #157

Merged
nobu merged 1 commit into
ruby:masterfrom
OskarEichler:codex/jruby-no-console
Sep 4, 2026
Merged

Return nil when JRuby has no console device#157
nobu merged 1 commit into
ruby:masterfrom
OskarEichler:codex/jruby-no-console

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary

Return nil from JRuby's IO.console helper when neither cached console nor usable tty exists.

Reproduction

A focused external model supplies non-tty standard streams. Current code stores nil and then sends the requested method to it; the candidate matches MRI by returning nil.

Verification

  • external no-console model
  • release/cumulative candidate: 36 tests / 143 assertions
  • current upstream: 35 tests / 144 assertions
  • syntax, package builds and Rails 8.1.3.1 loading

Compatibility

Restores the documented MRI return contract. JRuby was modeled but is unavailable locally; current upstream CI is green on JRuby. Prepared with AI-assisted source review; no repository tests were changed.

@nobu
nobu force-pushed the codex/jruby-no-console branch from f6936a3 to 36f42e8 Compare September 4, 2026 00:45
@nobu
nobu merged commit 26b35ca into ruby:master Sep 4, 2026
36 checks passed
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