summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 09:33:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-22 09:33:32 +0000
commit6ade3a42918e94be1c6d4b1bd9273ec1e3265525 (patch)
treeda7457f2fcb5bf5c357658edcf971f0285c0fc8a /test
parent456f3980b20ca031a2925094feff86ceb0032b8e (diff)
* string.c (rb_str_inspect): append for each chars instead of bulk
copy if encoding conversion is needed. [ruby-core:33283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index c024b58ed8..0c75f31311 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -1890,10 +1890,12 @@ class TestString < Test::Unit::TestCase
end
def test_ascii_incomat_inspect
+ bug4081 = '[ruby-core:33283]'
[Encoding::UTF_16LE, Encoding::UTF_16BE,
Encoding::UTF_32LE, Encoding::UTF_32BE].each do |e|
assert_equal('"abc"', "abc".encode(e).inspect)
assert_equal('"\\u3042\\u3044\\u3046"', "\u3042\u3044\u3046".encode(e).inspect)
+ assert_equal('"ab\\"c"', "ab\"c".encode(e).inspect, bug4081)
end
end