diff options
-rw-r--r-- | lib/rubygems/mock_gem_ui.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/mock_gem_ui.rb b/lib/rubygems/mock_gem_ui.rb index e6105d9d49..9ece75881c 100644 --- a/lib/rubygems/mock_gem_ui.rb +++ b/lib/rubygems/mock_gem_ui.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'stringio' require 'rubygems/user_interaction' ## @@ -46,6 +45,7 @@ class Gem::MockGemUi < Gem::StreamUI end def initialize(input = "") + require 'stringio' ins = StringIO.new input outs = StringIO.new errs = StringIO.new diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index c1286369be..88e30e71b3 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -14,7 +14,6 @@ require 'rubygems/basic_specification' require 'rubygems/stub_specification' require 'rubygems/specification_policy' require 'rubygems/util/list' -require 'stringio' ## # The Specification class contains the information for a gem. Typically @@ -2535,6 +2534,7 @@ class Gem::Specification < Gem::BasicSpecification builder << self ast = builder.tree + require 'stringio' io = StringIO.new io.set_encoding Encoding::UTF_8 |