diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 03:18:19 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 03:18:19 +0000 |
commit | 60d976b3ddbbb77f378c34f6633efb2cf4331d15 (patch) | |
tree | be5d1f8a977473a37fb2bee8a16b7b4a58e55b67 /test | |
parent | 72b489a5ad8033dd1c70784bb40e7419e1380a31 (diff) |
merges r30542 from trunk into ruby_1_9_2. Fixes #4279.
--
* 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/branches/ruby_1_9_2@31852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_pack.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb index 8fa0a90915..77078d5cac 100644 --- a/test/ruby/test_pack.rb +++ b/test/ruby/test_pack.rb @@ -555,6 +555,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 |