diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-27 13:19:16 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-27 13:19:16 +0000 |
commit | 74eb575c8d06ea64efb6c817e8cbed976e5e863a (patch) | |
tree | eef0431ae7e13b248843099347c47dc1c6a42b6e | |
parent | 72c7ea79b5f92626cf5b6c2c53898934cfd1c486 (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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/rexml/text.rb | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -1,6 +1,10 @@ +Wed Jan 27 22:16:00 2010 Kirk Haines <khaines@ruby-lang.org> + + * 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@ruby-lang.org> - * 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@ruby-lang.org> 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, '&' ) copy = copy.gsub( "&", "&" ) |