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

ruby-changes:11850

From: matz <ko1@a...>
Date: Thu, 21 May 2009 08:54:23 +0900 (JST)
Subject: [ruby-changes:11850] Ruby:r23504 (ruby_1_8): * lib/rexml/text.rb (REXML::Text.normalize): call to_s for input.

matz	2009-05-21 08:53:51 +0900 (Thu, 21 May 2009)

  New Revision: 23504

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

  Log:
    * lib/rexml/text.rb (REXML::Text.normalize): call to_s for input.
      [ruby-talk:337069]

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

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 23503)
+++ ruby_1_8/ChangeLog	(revision 23504)
@@ -1,3 +1,8 @@
+Thu May 21 08:50:58 2009  Yukihiro Matsumoto  <matz@r...>
+
+	* lib/rexml/text.rb (REXML::Text.normalize): call to_s for input.
+	  [ruby-talk:337069]
+
 Mon May 18 21:40:11 2009  Tanaka Akira  <akr@f...>
 
 	* lib/pathname.rb (Pathname#sub): suppress a warning.
Index: ruby_1_8/lib/rexml/text.rb
===================================================================
--- ruby_1_8/lib/rexml/text.rb	(revision 23503)
+++ ruby_1_8/lib/rexml/text.rb	(revision 23504)
@@ -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/

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