Skip to content

Preserve nil from JRuby getpass at EOF - #156

Open
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/jruby-getpass-eof
Open

Preserve nil from JRuby getpass at EOF#156
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/jruby-getpass-eof

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Use nil-safe chomp in both JRuby getpass implementations so EOF preserves MRI's nil contract instead of raising NoMethodError.

Reproduction

Focused external models return nil from gets; current code calls nil.chomp, while the candidate returns nil after restoring terminal output.

Verification

  • external EOF models for both JRuby paths
  • release/cumulative candidate: 36 tests / 143 assertions
  • current upstream: 35 tests / 144 assertions
  • syntax, package builds and Rails 8.1.3.1 loading

Compatibility

This restores MRI-compatible EOF behavior. 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.

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.

1 participant