aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-24 02:17:26 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-24 02:17:26 +0000
commit968e404220762d5adfc04b8c030c6f186cb47c0e (patch)
tree6e5e7f36c252217328cf5d4e95bcfbdb2bc0d690 /test/ruby
parente336136d8a4943b4778ce93df7c3d944614416d4 (diff)
downloadruby-968e404220762d5adfc04b8c030c6f186cb47c0e.tar.gz
* string.c (rb_enc_cr_str_buf_cat): ASCII incompatible encoding is
not compatible with any other encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_utf16.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb
index 474e7e8acc..7521242e3a 100644
--- a/test/ruby/test_utf16.rb
+++ b/test/ruby/test_utf16.rb
@@ -103,4 +103,12 @@ class TestUTF16 < Test::Unit::TestCase
def test_slice!
enccall("aa".force_encoding("UTF-16BE"), :slice!, -1)
end
+
+ def test_concat
+ s1 = ""
+ s2 = "aa".force_encoding("utf-16be")
+ assert_raise(ArgumentError, "#{encdump s1} << #{encdump s2}") {
+ s1 << s2
+ }
+ end
end