diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 00:12:54 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 00:12:54 +0000 |
commit | 3cefaf62788ca8eda1747c0db7dfcd350b6978f2 (patch) | |
tree | c127463008225d4f786d70d10fd74d647f72f7d5 /lib | |
parent | cb4feba988ccd3081161f01e417e9cd6785bd133 (diff) |
merges r31744 and r31745 from trunk into ruby_1_9_2.
--
prevent an error when passing a frozen string to REXML::Text.new
dup the string passed in instead of cloning so that it's frozen state is ignored
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>
--
ChangeLog for it
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rexml/text.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb index 05d5341abb..6623c0c03b 100644 --- a/lib/rexml/text.rb +++ b/lib/rexml/text.rb @@ -105,7 +105,7 @@ module REXML @normalized = @unnormalized = nil if arg.kind_of? String - @string = arg.clone + @string = arg.dup @string.squeeze!(" \n\t") unless respect_whitespace elsif arg.kind_of? Text @string = arg.to_s |