aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-14 05:03:22 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-14 05:03:22 +0000
commit2dbf7d11f2df4a4f4f40ff7b688097ede497cb35 (patch)
treefe8daf34665c933fc861726323b650da76f994cc /test
parenta2e9ec244e1c1b6355b9404f9573c6de44ff9e1a (diff)
downloadruby-2dbf7d11f2df4a4f4f40ff7b688097ede497cb35.tar.gz
* pack.c (pack_unpack): the resulted string of unpack('M') must have
ASCII-8BIT encoding (and ENC_CODERANGE_VALID). [ruby-core:34482] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_pack.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index a668f7b218..054fa82567 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -570,6 +570,8 @@ class TestPack < Test::Unit::TestCase
assert_equal(["\x0a"], "=0A=\n".unpack("M"))
assert_equal([""], "=0Z=\n".unpack("M"))
assert_equal([""], "=\r\n".unpack("M"))
+ assert_equal([""], "=\r\n".unpack("M"))
+ assert_equal(["\xC6\xF7"], "=C6=F7".unpack('M*'))
end
def test_pack_unpack_P2