diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 3 | ||||
-rw-r--r-- | lib/rexml/parsers/baseparser.rb | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 2cf79c8d40..8a3c7c9147 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -633,7 +633,8 @@ def dir_config(target, idefault=nil, ldefault=nil) idir = with_config(target + "-include", idefault) ldir = with_config(target + "-lib", ldefault) - idirs = idir ? idir.split(File::PATH_SEPARATOR) : [] +# idirs = idir ? idir.split(File::PATH_SEPARATOR) : [] + idirs = idir.split(File::PATH_SEPARATOR) rescue [] if defaults idirs.concat(defaults.collect {|dir| dir + "/include"}) idir = ([idir] + idirs).compact.join(File::PATH_SEPARATOR) diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index cfcea16f1d..d6e04c7817 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -106,9 +106,11 @@ module REXML @source = IOSource.new(source) elsif source.kind_of? Source @source = source + elsif defined? StringIO and source.kind_of? StringIO + @source = IOSource.new(source) else - raise "#{source.type} is not a valid input stream. It must be \n"+ - "either a String, IO, or Source." + raise "#{source.class} is not a valid input stream. It must be \n"+ + "either a String, IO, StringIO or Source." end @closed = nil @document_status = nil |