[前][次][番号順一覧][スレッド一覧]

ruby-changes:14599

From: wyhaines <ko1@a...>
Date: Wed, 27 Jan 2010 22:19:35 +0900 (JST)
Subject: [ruby-changes:14599] Ruby:r26442 (ruby_1_8_6): Backport #1806 ; (REXML::Text.normalize): call to_s for input.

wyhaines	2010-01-27 22:19:16 +0900 (Wed, 27 Jan 2010)

  New Revision: 26442

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26442

  Log:
    Backport #1806 [ruby-core:24506]; (REXML::Text.normalize): call to_s for input.

  Modified files:
    branches/ruby_1_8_6/ChangeLog
    branches/ruby_1_8_6/lib/rexml/text.rb

Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog	(revision 26441)
+++ ruby_1_8_6/ChangeLog	(revision 26442)
@@ -1,6 +1,10 @@
+Wed Jan 27 22:16:00 2010 Kirk Haines <khaines@r...>
+
+	* lib/rexml/text.rb: Backport #1806 [ruby-core:24506]; (REXML::Text.normalize): call to_s for input.
+
 Tue Jan 26 3:03:00 2010 Kirk Haines <khaines@r...>
 
-	* eval.c: Backport #2039 [ruby-core:25339]; backported r24413, r24416, r24442 to fix a problem with IO#select and threads. This is the same issues as Bug #1993 [ruby-core:25114].
+	* eval.c: Backport #2039 [ruby-core:25339]; backported r24413, r24416, r24442 to fix a problem with IO#select and threads. This is the same issues as Bug #1993 [ruby-core:25114]. r26435
 
 Thu Jan 21 5:10:00 2010 Kirk Haines <khaines@r...>
 
Index: ruby_1_8_6/lib/rexml/text.rb
===================================================================
--- ruby_1_8_6/lib/rexml/text.rb	(revision 26441)
+++ ruby_1_8_6/lib/rexml/text.rb	(revision 26442)
@@ -286,7 +286,7 @@
     EREFERENCE = /&(?!#{Entity::NAME};)/
     # Escapes all possible entities
     def Text::normalize( input, doctype=nil, entity_filter=nil )
-      copy = input
+      copy = input.to_s
       # Doing it like this rather than in a loop improves the speed
       #copy = copy.gsub( EREFERENCE, '&amp;' )
       copy = copy.gsub( "&", "&amp;" )

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]