summaryrefslogtreecommitdiff
path: root/lib/rexml/text.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/text.rb')
-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 2bc00429b3..a4a30b6d54 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, '&' )
copy = copy.gsub( "&", "&" )