ruby-changes:14763
From: mame <ko1@a...>
Date: Tue, 9 Feb 2010 21:30:57 +0900 (JST)
Subject: [ruby-changes:14763] Ruby:r26624 (trunk): * lib/rexml/text.rb (REXML::Text#initialize): REXML::Text.new checks
mame 2010-02-09 21:30:31 +0900 (Tue, 09 Feb 2010) New Revision: 26624 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26624 Log: * lib/rexml/text.rb (REXML::Text#initialize): REXML::Text.new checks raw text for illegal characters without entity check, for the sake of 1.8 compatibility. This had caused rubyspec error. Modified files: trunk/ChangeLog trunk/lib/rexml/text.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 26623) +++ ChangeLog (revision 26624) @@ -1,3 +1,9 @@ +Tue Feb 9 21:27:38 2010 Yusuke Endoh <mame@t...> + + * lib/rexml/text.rb (REXML::Text#initialize): REXML::Text.new checks + raw text for illegal characters without entity check, for the sake + of 1.8 compatibility. This had caused rubyspec error. + Mon Feb 8 23:49:24 2010 Yukihiro Matsumoto <matz@r...> * io.c (rb_io_getline_fast): wrong calculation of new position Index: lib/rexml/text.rb =================================================================== --- lib/rexml/text.rb (revision 26623) +++ lib/rexml/text.rb (revision 26624) @@ -117,7 +117,7 @@ @string.gsub!( /\r\n?/, "\n" ) - Text.check(@string, illegal, doctype) if @raw and @parent + Text.check(@string, illegal, doctype) if @raw end def parent= parent @@ -160,7 +160,7 @@ else raise "Illegal character '#{$1}' in raw string \"#{string}\"" end - elsif $3 and !SUBSTITUTES.include?($1) + elsif @parent and $3 and !SUBSTITUTES.include?($1) if !doctype or !doctype.entities.has_key?($3) raise "Undeclared entity '#{$1}' in raw string \"#{string}\"" end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/