diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb index 9a9b8f5d..655164f3 100644 --- a/lib/rexml/source.rb +++ b/lib/rexml/source.rb @@ -1,6 +1,7 @@ # coding: US-ASCII # frozen_string_literal: false +require "stringio" require "strscan" require_relative 'encoding' @@ -45,7 +46,6 @@ def SourceFactory::create_from(arg) arg.respond_to? :eof? IOSource.new(arg) elsif arg.respond_to? :to_str - require 'stringio' IOSource.new(StringIO.new(arg)) elsif arg.kind_of? Source arg