From a5596dc6a32caf39533965f5776791dba5a4a22b Mon Sep 17 00:00:00 2001 From: mame Date: Wed, 8 Apr 2009 13:05:07 +0000 Subject: * string.c (rb_str_dump): buffer length plus one byte for null terminator. [ruby-dev:38294] * test/ruby/test_m17n.rb (test_str_dump): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_m17n.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index efdc20c186..4ddec0371c 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -241,6 +241,9 @@ class TestM17N < Test::Unit::TestCase u("\xfc"), "\u3042", "ascii", + + "\u3042".encode("UTF-16LE"), + "\u3042".encode("UTF-16BE"), ].each do |str| assert_equal(str, eval(str.dump), "[ruby-dev:33142]") end -- cgit v1.2.3