From 2ce1e73700b1c81e3bdbfa40fced7f3a9fbe8752 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 12 Sep 2003 03:16:31 +0000 Subject: * bignum.c (rb_big_and): convert argument using 'to_int'. * bignum.c (rb_big_or): ditto. * bignum.c (rb_big_xor): ditto. * eval.c (rb_f_require): allow "require" on $SAFE>0, if feature name is not tainted. * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::stream): Supports StringIO. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/parsers/baseparser.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/rexml') diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index cfcea16f1..d6e04c781 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 -- cgit