summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 00:12:54 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 00:12:54 +0000
commit3cefaf62788ca8eda1747c0db7dfcd350b6978f2 (patch)
treec127463008225d4f786d70d10fd74d647f72f7d5 /test
parentcb4feba988ccd3081161f01e417e9cd6785bd133 (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 'test')
-rw-r--r--test/rexml/test_core.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/rexml/test_core.rb b/test/rexml/test_core.rb
index 48a31aee0e..204be0fdff 100644
--- a/test/rexml/test_core.rb
+++ b/test/rexml/test_core.rb
@@ -371,6 +371,9 @@ class Tester < Test::Unit::TestCase
assert_equal(string, text.to_s)
text2 = Text.new(text)
assert_equal(text, text2)
+ string = "Frozen".freeze
+ text3 = Text.new(string)
+ assert_equal(string, text3.to_s)
#testing substitution
string = "0 < ( 1 & 1 )"
correct = "0 &lt; ( 1 &amp; 1 )"