summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-27 13:19:16 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-27 13:19:16 +0000
commit74eb575c8d06ea64efb6c817e8cbed976e5e863a (patch)
treeeef0431ae7e13b248843099347c47dc1c6a42b6e /lib
parent72c7ea79b5f92626cf5b6c2c53898934cfd1c486 (diff)
Backport #1806 [ruby-core:24506]; (REXML::Text.normalize): call to_s for input.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/text.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb
index 9804aa710b..f273319758 100644
--- a/lib/rexml/text.rb
+++ b/lib/rexml/text.rb
@@ -286,7 +286,7 @@ module REXML
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;" )