Randy Stauner 2026-05-12 18:43:52 +0000 (Tue, 12 May 2026)
New Revision: 9a55fc506d
https://github.com/ruby/ruby/commit/9a55fc506d
Log:
[ruby/rubygems] Close stdin immediately when using popen2e
It's good hygiene to close the stdin pipe as soon as you are done writing to it.
This can happen for example if "ruby extconf.rb" spawns another
process (for example "cargo build", which may spawn arbitrary commands
to fetch credentials) and any of those subprocesses attempt to read
STDIN until it is closed.
We can close it as soon as it's created since we aren't writing to it at all.
https://github.com/ruby/rubygems/commit/ab09bfdf10
Modified files:
lib/rubygems/ext/builder.rb
test/rubygems/test_gem_ext_builder.rb