From 42f704a8faee3c60f2717430f1acbfbe97953491 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Fri, 27 May 2011 02:34:23 +0000 Subject: 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rexml/test_core.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/rexml') diff --git a/test/rexml/test_core.rb b/test/rexml/test_core.rb index d10c1bcc36..d6d62713f0 100644 --- a/test/rexml/test_core.rb +++ b/test/rexml/test_core.rb @@ -349,6 +349,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 < ( 1 & 1 )" -- cgit v1.2.3