Support for the Ruby 2.1 series ended on March 31 2017. See here for details.
This Gem::StreamUI subclass records input and output to StringIO for retrieval during tests.
# File rubygems/mock_gem_ui.rb, line 58 def ask question raise InputEOFError, question if @ins.eof? super end